Class CronJobToJspLogListener

java.lang.Object
de.hybris.platform.cronjob.jalo.CronJobToJspLogListener
All Implemented Interfaces:
HybrisLogListener

public class CronJobToJspLogListener extends Object implements HybrisLogListener
HybrisLogListener which listens for logs of a single CronJob and prints them to a specified JSP-site.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new listener instance which listens for logs of given cronjob and prints them to given JSP-site.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isEnabledFor(org.apache.log4j.Level level)
    Returns true if current cronjob is the managed cronjob of this listener and it is enabled for given level.
    void
    If current cronjob is the one managed by this listener, the log will be printed to the managed jsp context.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CronJobToJspLogListener

      public CronJobToJspLogListener(CronJob cronjob, JspContext jspc)
      Creates a new listener instance which listens for logs of given cronjob and prints them to given JSP-site.
      Parameters:
      cronjob - cronjob instance from which all logs will be written to JSP
      jspc - context holding JSP-site to which the logs will be written
  • Method Details

    • log

      public void log(HybrisLoggingEvent event)
      If current cronjob is the one managed by this listener, the log will be printed to the managed jsp context.
      Specified by:
      log in interface HybrisLogListener
      Parameters:
      event - the log which will be processed
    • isEnabledFor

      public boolean isEnabledFor(org.apache.log4j.Level level)
      Returns true if current cronjob is the managed cronjob of this listener and it is enabled for given level.
      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