Package de.hybris.platform.cronjob.jalo
Class CronJobToJspLogListener
- java.lang.Object
-
- de.hybris.platform.cronjob.jalo.CronJobToJspLogListener
-
- All Implemented Interfaces:
HybrisLogListener
public class CronJobToJspLogListener extends java.lang.Object implements HybrisLogListener
HybrisLogListenerwhich listens for logs of a singleCronJoband prints them to a specified JSP-site.
-
-
Constructor Summary
Constructors Constructor Description CronJobToJspLogListener(CronJob cronjob, JspContext jspc)Creates a new listener instance which listens for logs of given cronjob and prints them to given JSP-site.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisEnabledFor(org.apache.log4j.Level level)Returns true if current cronjob is the managed cronjob of this listener and it is enabled for given level.voidlog(HybrisLoggingEvent event)If current cronjob is the one managed by this listener, the log will be printed to the managed jsp context.
-
-
-
Constructor Detail
-
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 JSPjspc- context holding JSP-site to which the logs will be written
-
-
Method Detail
-
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:
login interfaceHybrisLogListener- 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:
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
-
-