Milenkan
asked on
No appendors found for category
I am receiving the following error(s) when running a command for updates and I am not sure of the problem.
log4j:ERROR No appenders could be found for category (com.example.application.d b.Database Access).
log4j:ERROR Please initialize the log4j system properly.
Below is my log4j properties file.
# Set root category priority to DEBUG with both the Console and
RollingFile
# appenders defined below
log4j.rootCategory=DEBUG, RollingFile
# RollingFile is set to be a RollingFileAppender
log4j.appender.RollingFile =org.apach e.log4j.Ro llingFileA ppender
log4j.appender.RollingFile .File=${IC X_HOME}/lo g/agent.lo g
log4j.appender.RollingFile .MaxFileSi ze=1MB
log4j.appender.RollingFile .MaxBackup Index=10
# RollingFile uses PatternLayout
log4j.appender.RollingFile .layout=or g.apache.l og4j.Patte rnLayout
# Print the date in ISO 8601 format
log4j.appender.RollingFile .layout.Co nversionPa ttern=%d (%x)[%t] %-5p
%c{1} - %m%n
# Print only messages of priority XXX or above in the package
com.example.application
log4j.category.com.example .applicati on=INFO
log4j.category.com.example .applicati on.agent=I NFO
log4j.category.com.example .applicati on.agent.t ask.TaskBa se=DEBUG
log4j.category.com.example .applicati on.agent.p rotocol.sn mp.Context Man
ager=WARN
# ThreadDumpRollingFile is set to be a RollingFileAppender
log4j.appender.ThreadDumpR ollingFile =org.apach e.log4j.Ro llingFileA ppende
r
log4j.appender.ThreadDumpR ollingFile .File=${IC X_HOME}/lo g/threaddu mp.log
log4j.appender.ThreadDumpR ollingFile .MaxFileSi ze=10MB
log4j.appender.ThreadDumpR ollingFile .MaxBackup Index=10
# ThreadDumpRollingFile uses PatternLayout
log4j.appender.ThreadDumpR ollingFile .layout=or g.apache.l og4j.Patte rnLayo
ut
# Print the date in ISO 8601 format
log4j.appender.ThreadDumpR ollingFile .layout.Co nversionPa ttern=%d
(%x)[%t] %-5p %c{1} - %m%n
log4j.category.com.example .common.th read=DEBUG , ThreadDumpRollingFile
Any insight as to what could be causing this would be much appreciated.
log4j:ERROR No appenders could be found for category (com.example.application.d
log4j:ERROR Please initialize the log4j system properly.
Below is my log4j properties file.
# Set root category priority to DEBUG with both the Console and
RollingFile
# appenders defined below
log4j.rootCategory=DEBUG, RollingFile
# RollingFile is set to be a RollingFileAppender
log4j.appender.RollingFile
log4j.appender.RollingFile
log4j.appender.RollingFile
log4j.appender.RollingFile
# RollingFile uses PatternLayout
log4j.appender.RollingFile
# Print the date in ISO 8601 format
log4j.appender.RollingFile
%c{1} - %m%n
# Print only messages of priority XXX or above in the package
com.example.application
log4j.category.com.example
log4j.category.com.example
log4j.category.com.example
log4j.category.com.example
ager=WARN
# ThreadDumpRollingFile is set to be a RollingFileAppender
log4j.appender.ThreadDumpR
r
log4j.appender.ThreadDumpR
log4j.appender.ThreadDumpR
log4j.appender.ThreadDumpR
# ThreadDumpRollingFile uses PatternLayout
log4j.appender.ThreadDumpR
ut
# Print the date in ISO 8601 format
log4j.appender.ThreadDumpR
(%x)[%t] %-5p %c{1} - %m%n
log4j.category.com.example
Any insight as to what could be causing this would be much appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
log4j.rootCategory=DEBUG, RollingFile
with
log4j.rootLogger=DEBUG, RollingFile
Then replace this lines:
log4j.category.com.example
log4j.category.com.example
log4j.category.com.example
log4j.category.com.example
ager=WARN
with this lines:
log4j.logger.com.example.a
log4j.logger.com.example.a
log4j.logger.com.example.a
log4j.logger.com.example.a
ager=WARN
In this case you will have rootLoger and the loggers not presented will have defaul level taken from the rootLogger. Hope it will help you!