Use logback instead of log4j

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Use logback instead of log4j

Vishwas Siravara
Hi ,
From the flink doc , in order to use logback instead of log4j " Users willing to use logback instead of log4j can just exclude log4j (or delete it from the lib/ folder)." https://ci.apache.org/projects/flink/flink-docs-stable/monitoring/logging.html .

However when i delete it from the lib and start the cluster , there are no logs generated , instead I see console log which says "Failed to instantiate SLF4J LoggerFactory"
Reported exception:
java.lang.NoClassDefFoundError: org/apache/log4j/Level
        at org.slf4j.LoggerFactory.bind(LoggerFactory.java:143)
        at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:122)
        at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:378)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:328)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:349)
        at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.<clinit>(ClusterEntrypoint.java:98)

How can I use logback instead ? 

Thanks,
Vishwas 
Reply | Threaded
Open this post in threaded view
|

Re: Use logback instead of log4j

Vishwas Siravara
Any idea on how I can use log back instead ? 

On Fri, Aug 23, 2019 at 1:22 PM Vishwas Siravara <[hidden email]> wrote:
Hi ,
From the flink doc , in order to use logback instead of log4j " Users willing to use logback instead of log4j can just exclude log4j (or delete it from the lib/ folder)." https://ci.apache.org/projects/flink/flink-docs-stable/monitoring/logging.html .

However when i delete it from the lib and start the cluster , there are no logs generated , instead I see console log which says "Failed to instantiate SLF4J LoggerFactory"
Reported exception:
java.lang.NoClassDefFoundError: org/apache/log4j/Level
        at org.slf4j.LoggerFactory.bind(LoggerFactory.java:143)
        at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:122)
        at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:378)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:328)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:349)
        at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.<clinit>(ClusterEntrypoint.java:98)

How can I use logback instead ? 

Thanks,
Vishwas