Package de.hybris.platform.task.logging
Class MediaFileLogListener
- java.lang.Object
-
- de.hybris.platform.task.logging.MediaFileLogListener
-
- All Implemented Interfaces:
HybrisLogListener
public class MediaFileLogListener extends java.lang.Object implements HybrisLogListener
-
-
Constructor Summary
Constructors Constructor Description MediaFileLogListener(org.apache.log4j.Level effectiveLevel, java.lang.String loggerName, TempFileWriter tempFileWriter)MediaFileLogListener(org.apache.log4j.Level effectiveLevel, java.lang.String loggerName, TempFileWriter tempFileWriter, boolean logOnlyForCurrentThread)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisEnabledFor(org.apache.log4j.Level level)Is called before each call oflogto check if the listener is enabled for given log level.voidlog(HybrisLoggingEvent event)Processes in its specific way given log event.
-
-
-
Constructor Detail
-
MediaFileLogListener
public MediaFileLogListener(org.apache.log4j.Level effectiveLevel, java.lang.String loggerName, TempFileWriter tempFileWriter)- Parameters:
effectiveLevel- the lowest level that should be logged by this loggerloggerName- the logger nametempFileWriter- writer to the temporary file
-
MediaFileLogListener
public MediaFileLogListener(org.apache.log4j.Level effectiveLevel, java.lang.String loggerName, TempFileWriter tempFileWriter, boolean logOnlyForCurrentThread)- Parameters:
effectiveLevel- the lowest level that should be logged by this loggerloggerName- the logger nametempFileWriter- writer to the temporary filelogOnlyForCurrentThread- iftrueonly logging for the current thread should be available. Iffalsethe listener will consume any logs that are logged in the system (regardless of the thread that is calling the logger)
-
-
Method Detail
-
isEnabledFor
public boolean isEnabledFor(org.apache.log4j.Level level)
Description copied from interface:HybrisLogListenerIs called before each call oflogto check if the listener is enabled for given log level. If the result is true the call oflogwill be performed afterwards, else not. Here, implement your context dependent log level filter.- Specified by:
isEnabledForin interfaceHybrisLogListener- Parameters:
level- level of the log which has to be checked for filtering- Returns:
- true, if level is OK and log can be passed to
logmethod, false otherwise
-
log
public void log(HybrisLoggingEvent event)
Description copied from interface:HybrisLogListenerProcesses in its specific way given log event.- Specified by:
login interfaceHybrisLogListener- Parameters:
event- the log which will be processed
-
-