Class MediaFileLogListener

    • 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
      boolean isEnabledFor​(org.apache.log4j.Level level)
      Is called before each call of log to check if the listener is enabled for given log level.
      void log​(HybrisLoggingEvent event)
      Processes in its specific way given log event.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 logger
        loggerName - the logger name
        tempFileWriter - 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 logger
        loggerName - the logger name
        tempFileWriter - writer to the temporary file
        logOnlyForCurrentThread - if true only logging for the current thread should be available. If false the 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: HybrisLogListener
        Is called before each call of log to check if the listener is enabled for given log level. If the result is true the call of log will be performed afterwards, else not. Here, implement your context dependent log level filter.
        Specified by:
        isEnabledFor in interface HybrisLogListener
        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 log method, false otherwise