Class BufferredLogger
- java.lang.Object
-
- org.nuxeo.ecm.platform.importer.log.BasicLogger
-
- org.nuxeo.ecm.platform.importer.log.BufferredLogger
-
- All Implemented Interfaces:
ImporterLogger
public class BufferredLogger extends BasicLogger
- Author:
- Thierry Delprat
-
-
Field Summary
Fields Modifier and Type Field Description protected Integer
bufferSize
protected static int
DEFAULT_LOG_BUFFER_LENGTH
protected ReentrantReadWriteLock
lock
protected LinkedList<String>
logStack
-
Fields inherited from class org.nuxeo.ecm.platform.importer.log.BasicLogger
bufferActive, javaLogger
-
-
Constructor Summary
Constructors Constructor Description BufferredLogger(Log javaLogger)
BufferredLogger(Log javaLogger, int bufferSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
debug(String message)
void
debug(String message, Throwable t)
void
error(String message)
void
error(String message, Throwable t)
String
getLoggerBuffer(String sep)
protected int
getMaxStackLen()
void
info(String message)
protected void
logInStack(String level, String message)
void
warn(String message)
-
Methods inherited from class org.nuxeo.ecm.platform.importer.log.BasicLogger
getLoggerBuffer, isBufferActive, setBufferActive
-
-
-
-
Field Detail
-
lock
protected ReentrantReadWriteLock lock
-
DEFAULT_LOG_BUFFER_LENGTH
protected static int DEFAULT_LOG_BUFFER_LENGTH
-
bufferSize
protected Integer bufferSize
-
logStack
protected LinkedList<String> logStack
-
-
Method Detail
-
getMaxStackLen
protected int getMaxStackLen()
-
getLoggerBuffer
public String getLoggerBuffer(String sep)
- Specified by:
getLoggerBuffer
in interfaceImporterLogger
- Overrides:
getLoggerBuffer
in classBasicLogger
-
info
public void info(String message)
- Specified by:
info
in interfaceImporterLogger
- Overrides:
info
in classBasicLogger
-
warn
public void warn(String message)
- Specified by:
warn
in interfaceImporterLogger
- Overrides:
warn
in classBasicLogger
-
debug
public void debug(String message)
- Specified by:
debug
in interfaceImporterLogger
- Overrides:
debug
in classBasicLogger
-
debug
public void debug(String message, Throwable t)
- Specified by:
debug
in interfaceImporterLogger
- Overrides:
debug
in classBasicLogger
-
error
public void error(String message)
- Specified by:
error
in interfaceImporterLogger
- Overrides:
error
in classBasicLogger
-
error
public void error(String message, Throwable t)
- Specified by:
error
in interfaceImporterLogger
- Overrides:
error
in classBasicLogger
-
-