You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We decided to move from centOS to ubuntu 22.04 for our jenkins server. We have a common-framework dependency which we use to manage the common-configurations across all of our spring-boot micro-services. This common framework has the logback-configuration.xml which has the logging pattern configuration.
We have a micro-service A, this uses common-framework dependency. We successfully built the common-framework and service A, but while deploying to kubernetes we got below exception,
java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.classic.PatternLayout("") - Empty or null pattern.
ERROR in ch.qos.logback.classic.PatternLayout("") - Empty or null pattern.
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:179)
at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:80)
at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60)
In the environment we use this encoder class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder" to encode the log pattern into a JSON structure using this appender class="ch.qos.logback.core.ConsoleAppender".
we are using version 1.2.11 for logback, version 4.9 for net.logstash.logback.
The same piece of configuration works on the local machine (windows/11) and when the image is built using the jenkins-server running on the centOS.
I tried the following configuration (keeping a single <pattern> inside the <providers>) as well, and with below configuration only timestamp is getting logged.
We decided to move from centOS to ubuntu 22.04 for our jenkins server. We have a common-framework dependency which we use to manage the common-configurations across all of our spring-boot micro-services. This common framework has the
logback-configuration.xml
which has the logging pattern configuration.We have a micro-service A, this uses common-framework dependency. We successfully built the common-framework and service A, but while deploying to kubernetes we got below exception,
In the environment we use this encoder
class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder"
to encode the log pattern into a JSON structure using this appenderclass="ch.qos.logback.core.ConsoleAppender"
.Sample configuration,
we are using version
1.2.11
forlogback
, version4.9
fornet.logstash.logback
.The same piece of configuration works on the local machine (windows/11) and when the image is built using the jenkins-server running on the centOS.
I tried the following configuration (keeping a single
<pattern>
inside the<providers>
) as well, and with below configuration only timestamp is getting logged.Sample logs
The text was updated successfully, but these errors were encountered: