Back to project page slf4android.
The source code is released under:
MIT License
If you think the Android project slf4android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package pl.brightinventions.slf4android; /*from w ww. j av a2 s .c o m*/ import java.util.concurrent.ConcurrentLinkedQueue; class ListLogRecordFormatter implements LogRecordFormatter { private ConcurrentLinkedQueue<LoggerPatternValueSupplier> valueSuppliers = new ConcurrentLinkedQueue<LoggerPatternValueSupplier>(); @Override public String format(LogRecord record) { StringBuilder logMessage = new StringBuilder(); for (LoggerPatternValueSupplier supplier : valueSuppliers) { supplier.append(record, logMessage); } return logMessage.toString(); } public void add(LoggerPatternValueSupplier supplier) { if (supplier == null) { throw new IllegalArgumentException("supplier must not be null"); } valueSuppliers.add(supplier); } }