This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-extensions-logback-groovy-fragment.git
commit f138e636f62a28f537d4c78bc6dc897ac114ad5a Author: Chetan Mehrotra <[email protected]> AuthorDate: Tue Aug 5 04:48:04 2014 +0000 SLING-3814 - Groovy fragment bundle for Commons Log to support scriptable event evaluation Updated readme with details related to ILoggingEvent variable accessible to script git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1615862 13f79535-47bb-0310-9956-ffa450edef68 --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9543478..722beeb 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ if you need logging only from session created in a particular thread then that can be done in following way <?xml version="1.0" encoding="UTF-8"?> - <configuration> + <configuration scan="true" scanPeriod="1 second"> <jmxConfigurator/> <newRule pattern="*/configuration/osgi" actionClass="org.apache.sling.commons.log.logback.OsgiAction"/> <newRule pattern="*/configuration/appender-ref-osgi" actionClass="org.apache.sling.commons.log.logback.OsgiAppenderRefAction"/> @@ -20,7 +20,7 @@ can be done in following way <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator"> <expression><![CDATA[ - return event.getThreadName().contains("JobHandler"); + return e.getThreadName().contains("JobHandler"); ]]></expression> </evaluator> <OnMismatch>DENY</OnMismatch> @@ -38,7 +38,10 @@ can be done in following way </logger> </configuration> -Above logback config would route all log messages from `org.apache.jackrabbit.oak.jcr.operations` +Logback exposes a variable `e` which is of type [ILoggingEvent][1]. It provides access to current logging +event. Above logback config would route all log messages from `org.apache.jackrabbit.oak.jcr.operations` category to `${sling.home}/logs/oak.log`. Further only those log messages would be logged where the `threadName` contains `JobHandler`. Depending on the requirement the expression can -be customised. \ No newline at end of file +be customised. + +[1]: http://logback.qos.ch/apidocs/ch/qos/logback/classic/spi/ILoggingEvent.html \ No newline at end of file -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
