[logback-user] Config doesn't work

Ceki Gülcü ceki at qos.ch
Tue Mar 14 22:22:17 CET 2017


jboss-logging should have StaticLoggerBinder as well. Anyway, what 
message does slf4j display at boot time?

On 3/14/2017 22:17, Donald McLean wrote:
> Since I use an IDE, I can't use the $JARS trick, but I went through the
> list library by library and the only ones that reference that class are
> SLF4J (surprise!) and Logback (surprise!).
>
> On Tue, Mar 14, 2017 at 2:13 PM, Ceki Gülcü <ceki at qos.ch
> <mailto:ceki at qos.ch>> wrote:
>
>
>
>     jboss-logging-3.3.0.Final.jar might be the culprit.
>
>     If not, I suggest that you go through all the jars and check whether
>     they contain the org.slf4j.impl.StaticLoggerBinder class
>
>     Assuming JARS environment variable contains the list of your jar
>     files, the following Unix command works:
>
>     for i in $JARS; do echo $i; jar tvf $i| grep StaticLoggerBinder; done
>
>
>     On 3/14/2017 19:05, Donald McLean wrote:
>
>         Hi Ceki,
>
>         Thank you for responding. Of the stuff on my classpath, the only
>         thing I
>         haven't used in other projects is neo4j. Though I don't
>         generally pay
>         much attention to the classpath order.
>
>         Thank you,
>
>         Donald
>
>         Classpath items:
>
>
>         IntelliJIdea2017.1/Scala/lib/scala-plugin-runners.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/charsets.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/deploy.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/ext/cldrdata.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/ext/dnsns.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/ext/jaccess.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/ext/jfxrt.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/ext/localedata.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/ext/nashorn.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/ext/sunec.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/ext/zipfs.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/javaws.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/jce.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/jfr.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/jfxswt.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/jsse.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/management-agent.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/plugin.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/resources.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/jre/lib/rt.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/lib/ant-javafx.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/lib/dt.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/lib/javafx-mx.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/lib/jconsole.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/lib/packager.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/lib/sa-jdi.jar
>
>         jdk1.8.0_91.jdk/Contents/Home/lib/tools.jar
>
>         scala-2.12.1/lib/scala-library.jar
>
>         scala-2.12.1/lib/scala-parser-combinators_2.12-1.0.4.jar
>
>         scala-2.12.1/lib/scala-reflect.jar
>
>         scala-2.12.1/lib/scala-swing_2.12-2.0.0-M2.jar
>
>         scala-2.12.1/lib/scala-xml_2.12-1.0.6.jar
>
>         logback-1.2.1/logback-core-1.2.1.jar
>
>         logback-1.2.1/logback-classic-1.2.1.jar
>
>         slf4j-1.7.12/slf4j-api-1.7.12.jar
>
>         junit-4.12/hamcrest-core-1.3.jar
>
>         junit-4.12/junit-4.12.jar
>
>         lift-3.0.1/lib/lift-actor_2.12-3.0.1.jar
>
>         lift-3.0.1/lib/lift-common_2.12-3.0.1.jar
>
>         lift-3.0.1/lib/lift-json_2.12-3.0.1.jar
>
>         lift-3.0.1/lib/lift-json-ext_2.12-3.0.1.jar
>
>         lift-3.0.1/lib/lift-markdown_2.12-3.0.1.jar
>
>         lift-3.0.1/lib/lift-util_2.12-3.0.1.jar
>
>         lift-3.0.1/lib/lift-webkit_2.12-3.0.1.jar
>
>         lift-3.0.1/lib/lift-mapper_2.12-3.0.1.jar
>
>         commons-io-2.4/commons-io-2.4.jar
>
>         commons-lang3-3.4/commons-lang3-3.4.jar
>
>         joda-time-2.9.7/joda-time-2.9.7.jar
>
>         joda-convert-1.8.1/joda-convert-1.8.1.jar
>
>         neo4j-3.0.7/neo4j-java-driver-1.0.6.jar
>
>         db-derby-10.13.1.1-bin/lib/derby.jar
>
>         db-derby-10.13.1.1-bin/lib/derbytools.jar
>
>         hibernate-release-5.2.5.Final/lib/required/antlr-2.7.7.jar
>
>         hibernate-release-5.2.5.Final/lib/required/cdi-api-1.1.jar
>
>         hibernate-release-5.2.5.Final/lib/required/classmate-1.3.0.jar
>
>         hibernate-release-5.2.5.Final/lib/required/dom4j-1.6.1.jar
>
>         hibernate-release-5.2.5.Final/lib/required/el-api-2.2.jar
>
>         hibernate-release-5.2.5.Final/lib/required/geronimo-jta_1.1_spec-1.1.1.jar
>
>         hibernate-release-5.2.5.Final/lib/required/hibernate-commons-annotations-5.0.1.Final.jar
>
>         hibernate-release-5.2.5.Final/lib/required/hibernate-core-5.2.5.Final.jar
>
>         hibernate-release-5.2.5.Final/lib/required/hibernate-jpa-2.1-api-1.0.0.Final.jar
>
>         hibernate-release-5.2.5.Final/lib/required/jandex-2.0.3.Final.jar
>
>         hibernate-release-5.2.5.Final/lib/required/javassist-3.20.0-GA.jar
>
>         hibernate-release-5.2.5.Final/lib/required/javax.inject-1.jar
>
>         hibernate-release-5.2.5.Final/lib/required/jboss-interceptors-api_1.1_spec-1.0.0.Beta1.jar
>
>         hibernate-release-5.2.5.Final/lib/required/jboss-logging-3.3.0.Final.jar
>
>         hibernate-release-5.2.5.Final/lib/required/jsr250-api-1.0.jar
>
>         scalatest-3.0.1/scalactic_2.12-3.0.1.jar
>
>         scalatest-3.0.1/scalatest-app_2.12-3.0.1.jar
>
>         On Tue, Mar 14, 2017 at 1:03 PM, Ceki Gülcü <ceki at qos.ch
>         <mailto:ceki at qos.ch>
>         <mailto:ceki at qos.ch <mailto:ceki at qos.ch>>> wrote:
>
>
>             Hi Donald,
>
>             The following error will disappear with
>         logback-core/logback-classic
>             version 1.2.x.
>
>             no applicable action for [immediateFlush], current
>         ElementPath  is
>             [[configuration][appender][immediateFlush]]
>
>             In addition, I recommend that you enable logback's internal
>         messages
>             with:
>
>             <configuration debug="true">
>             </configuration>
>
>             Having said that, given the status messages you provided, if
>         logs
>             are going to STDOUT, then logs are being hijacked by some other
>             component. What's on your classpath?
>
>             --
>             Ceki
>
>
>
>             On 3/14/2017 16:50, Donald McLean wrote:
>
>                 The config shown below is creating the file, but nothing is
>                 writing to
>                 it, and some classes are not logging at all. Those that
>         do log,
>                 it's all
>                 going to stdout. Obviously, I've done something stupid,
>         but I can't
>                 figure out what.
>
>                 Here is some output from stdout that looks like it's
>         from logback:
>
>                 Got 12 errors.
>                 INFO in
>         ch.qos.logback.classic.joran.action.ConfigurationAction
>                 - debug
>                 attribute not set
>                 INFO in ch.qos.logback.core.joran.action.TimestampAction
>         - Using
>                 current
>                 interpretation time, i.e. now, as time reference.
>                 INFO in ch.qos.logback.core.joran.action.TimestampAction
>         - Adding
>                 property to the context with key="bySecond" and
>                 value="20170314T113135"
>                 to the LOCAL scope
>                 INFO in ch.qos.logback.core.joran.action.AppenderAction
>         - About to
>                 instantiate appender of type
>         [ch.qos.logback.core.FileAppender]
>                 INFO in ch.qos.logback.core.joran.action.AppenderAction
>         - Naming
>                 appender as [FILE]
>                 ERROR in ch.qos.logback.core.joran.spi.Interpreter at 7:33 - no
>                 applicable
>                 action for [immediateFlush], current ElementPath  is
>                 [[configuration][appender][immediateFlush]]
>                 INFO in
>         ch.qos.logback.core.joran.action.NestedComplexPropertyIA -
>                 Assuming default type
>                 [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for
>                 [encoder] property
>                 INFO in ch.qos.logback.core.FileAppender[FILE] - File
>         property
>                 is set to
>                 [GraphDBTest-20170314T113135.log]
>                 INFO in
>         ch.qos.logback.classic.joran.action.RootLoggerAction -
>                 Setting
>                 level of ROOT logger to TRACE
>                 INFO in ch.qos.logback.core.joran.action.AppenderRefAction -
>                 Attaching
>                 appender named [FILE] to Logger[ROOT]
>                 INFO in
>         ch.qos.logback.classic.joran.action.ConfigurationAction
>                 - End of
>                 configuration.
>                 INFO in
>         ch.qos.logback.classic.joran.JoranConfigurator at 13b6aecc -
>                 Registering current configuration as safe fallback point
>
>                 I would really appreciate a suggestion as to what I'm
>         doing wrong.
>
>                 Thank you,
>
>                 Donald
>
>
>                 <configuration>
>
>                             <timestamp datePattern="yyyyMMdd'T'HHmmss"
>                 key="bySecond"/>
>
>                             <appender
>         class="ch.qos.logback.core.FileAppender"
>                 name="FILE">
>                                 <file>GraphDBTest-${bySecond}.log</file>
>                                 <immediateFlush>true</immediateFlush>
>
>                                 <encoder>
>                                     <pattern>%date %level [%thread]
>         %logger{10}
>                 [%file:%line] %msg%n</pattern>
>                                 </encoder>
>                             </appender>
>
>                             <root level="TRACE">
>                                 <appender-ref ref="FILE"/>
>                             </root>
>
>                         </configuration>
>
>
>
>         _______________________________________________
>         logback-user mailing list
>         logback-user at qos.ch <mailto:logback-user at qos.ch>
>         http://mailman.qos.ch/mailman/listinfo/logback-user
>         <http://mailman.qos.ch/mailman/listinfo/logback-user>
>
>     _______________________________________________
>     logback-user mailing list
>     logback-user at qos.ch <mailto:logback-user at qos.ch>
>     http://mailman.qos.ch/mailman/listinfo/logback-user
>     <http://mailman.qos.ch/mailman/listinfo/logback-user>
>
>
>
>
> --
> Family photographs are a critical legacy for
> ourselves and our descendants. Protect that
> legacy with a digital backup and recovery plan.
>
>
> _______________________________________________
> logback-user mailing list
> logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
>


More information about the logback-user mailing list