[logback-user] Config doesn't work

Ceki Gülcü ceki at qos.ch
Tue Mar 14 18:03:47 CET 2017


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
> http://mailman.qos.ch/mailman/listinfo/logback-user
>


More information about the logback-user mailing list