Hello!
How can I use custom layout class for Logback? I created a new layout class:
package core.models.logger
import ch.qos.logback.classic.html.HTMLLayout
class AccessLoggingLayout extends HTMLLayout {}
and defined an appender in logback,xml:
<appender name="ACCESSFILE" class="ch.qos.logback.core.FileAppender">
<file>${application.home:-.}/logs/access.html</file>
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="core.models.logger.AccessLoggingLayout">
<pattern>%date{ISO8601}%level%message</pattern>
</layout>
</encoder>
</appender>
When I try to run my application, the AccessLoggingLayout class is not found by the class loader. Can you help me with this issue?
Hubert