cq5 - Additive logback configuration for OSGi log configuration -
i installed bundle cq5.6.1
<dependency> <groupid>org.apache.sling</groupid> <artifactid>org.apache.sling.commons.log</artifactid> <version>4.0.0</version> </dependency>
it works good, have problem additivity flag.
if add together apache sling logging logger configuration (org.apache.sling.commons.log.logmanager.factory) specific package, won't additive doesn't inherit configuration parent loggers.
i'm using external logback.xml.
<?xml version="1.0" encoding="utf-8"?> <configuration debug="true"> <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"/> <osgi/> <appender name="syslog" class="net.logstash.logback.appender.logstashsocketappender"> <host>host</host> <port>port</port> </appender> <logger name="com.my.package" level="info"/> <root level="warn"> <appender-ref ref="syslog" /> </root> </configuration>
i have osgi config:
org.apache.sling.commons.log.file="logs/other.log" org.apache.sling.commons.log.level="debug" org.apache.sling.commons.log.file.size="'.'yyyy-mm-dd" org.apache.sling.commons.log.file.number=i"7" org.apache.sling.commons.log.pattern="{0,date,dd.mm.yyyy hh:mm:ss.sss} *{4}* [{2}] {3} {5}" org.apache.sling.commons.log.names="com.my.package.other"
but logs com.my.package.other never goes syslog.
if add together line logback.xml:
<logger name="com.my.package.other" level="info"/>
then on /system/console/slinglog can see logger com.my.package.other not additive.
so how can utilize logs configured org.apache.sling.commons.log.logmanager.factory additive loggers?
thanks in advance!
"unfortunately cannot configured on osgi console (no field)."
you cannot set hidden properties via felix console. can set using sling:osgiconfig nodes (http://sling.apache.org/site/jcr-installer-provider.html)
cq5 logback sling
No comments:
Post a Comment