java.lang.Object
de.hybris.platform.mediaconversion.imagemagick.LoggingDrain
All Implemented Interfaces:
Drain

public class LoggingDrain extends Object implements Drain
Drain implementation delegating all consumed lines to a Log4J Logger.
  • Constructor Details

    • LoggingDrain

      public LoggingDrain(Class<?> clazz, org.apache.log4j.Level level)
      Creates a LoggingDrain using the given clazz to retrieve a Logger and the specified Level.
      Parameters:
      clazz - the logger name to use.
      level - the log level to use.
    • LoggingDrain

      public LoggingDrain(String name, org.apache.log4j.Level level)
      Creates a LoggingDrain using the given name to retrieve a Logger and the given Level.
      Parameters:
      name - the name of the Logger to use.
      level - the log level to use.
    • LoggingDrain

      public LoggingDrain(org.apache.log4j.Logger logger, org.apache.log4j.Level level)
      Creates a new LoggingDrain using the specified Logger and log Level.
      Parameters:
      logger - the Logger to log to
      level - the Level to log on
  • Method Details

    • drain

      public void drain(String message)
      Callback method to process a line outputted by the process. A trailing newline character is truncated.
      Specified by:
      drain in interface Drain
      Parameters:
      message - the output line to process.
      See Also:
    • getLogger

      public org.apache.log4j.Logger getLogger()
    • getLevel

      public org.apache.log4j.Level getLevel()