Package de.hybris.platform.cronjob.jalo
Class CronJobToJspLogListener
java.lang.Object
de.hybris.platform.cronjob.jalo.CronJobToJspLogListener
- All Implemented Interfaces:
HybrisLogListener
HybrisLogListener which listens for logs of a single CronJob and prints them to a specified JSP-site.-
Constructor Summary
ConstructorsConstructorDescriptionCronJobToJspLogListener(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
Modifier and TypeMethodDescriptionbooleanisEnabledFor(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 Details
-
CronJobToJspLogListener
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 Details
-
log
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
-