D
dr. Hans van der Meer
When I configured logging as in the logback manual in logback.xml:
<appender name="STDOUT"
class="mypackage.MyAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%-4relative [%thread] %-5level %class - %msg%n</pattern>
</layout>
</appender>
then an object of class mypackage.MyAppender is constructed and can be used for
receiving LoggingEvents.
However, I cannot format the logevents directly with this Appender through:
appender.getLayout().doLayout(logevent)
because the getLayout returns null?
How is this possible? I would like to format the logevents in accordance with
the pattern as given in logback.xml.
Using logback (latest) version 0.9.5.
Hans van der Meer
<appender name="STDOUT"
class="mypackage.MyAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%-4relative [%thread] %-5level %class - %msg%n</pattern>
</layout>
</appender>
then an object of class mypackage.MyAppender is constructed and can be used for
receiving LoggingEvents.
However, I cannot format the logevents directly with this Appender through:
appender.getLayout().doLayout(logevent)
because the getLayout returns null?
How is this possible? I would like to format the logevents in accordance with
the pattern as given in logback.xml.
Using logback (latest) version 0.9.5.
Hans van der Meer