Run the program and report the following warnings:
log4j:WARN No appenders could be found for logger (..). log4j:WARN Please initialize the log4j system properly.
*Where “..” is the name of a package, such as org.apache.flume.api.abstractrpcclient
Solution:
Add the log4j.properties file in the Src/main/Java/resources directory and add the following:
log4j.rootLogger=debug, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
Similar Posts:
- [How to Solve] log4j: WARN Please initialize the log4j system properly
- log4j:WARN No appenders could be found for logger [How to Solve]
- [Solved] Failed to load class “org.slf4j.impl.StaticLoggerBinder
- How to Solve log4net multi process access log file Error
- Logback: solve the problem that logback.xml configuration doesn’t work
- [Solved] Flume startup error: org.apache.flume.FlumeException: Failed to set up server socket
- CMake: How to Complie Log4cplus
- [olved] flume Install Error: Could not find or load main class org.apache.flume.tools.GetJavaProperty
- [Solved] Could not find resource com/cth/dao/UserImpl.xml & Single mapping file not found
- ETL component flume startup error [How to Solve]