cfmlprojects / runwar

Other
11 stars 16 forks source link

Log4j warnings are back, and more than ever in latest snapshot #108

Closed bdw429s closed 6 years ago

bdw429s commented 6 years ago

This message here that appears when the first http call is made was gone in the first 3.8 snapshot, but now it's back:

log4j:WARN No appenders could be found for logger (org.apache.http.client.prot
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more

And now there's even more logging popping up. This is from just closing a Git repo with JGit.

log4j: reset attribute= "false".
log4j: Threshold ="null".
log4j: Retreiving an instance of org.apache.log4j.Logger.
log4j: Setting [org.xnio.nio] additivity to [false].
log4j: Level value for org.xnio.nio is  [ERROR].
log4j: org.xnio.nio level set to ERROR
log4j: Class name: [org.apache.log4j.ConsoleAppender]
log4j: Parsing layout of class: "com.jcabi.log.MulticolorLayout"
log4j: Setting property [conversionPattern] to [].
log4j: Adding appender named [console] to category [org.xnio.nio].
log4j: Retreiving an instance of org.apache.log4j.Logger.
log4j: Setting [dorkbox.systemTray.SystemTray] additivity to [false].
log4j: Level value for dorkbox.systemTray.SystemTray is  [DEBUG].
log4j: dorkbox.systemTray.SystemTray level set to DEBUG
log4j: Adding appender named [console] to category [dorkbox.systemTray.SystemT
log4j: Retreiving an instance of org.apache.log4j.Logger.
log4j: Setting [runwar.server] additivity to [false].
log4j: Level value for runwar.server is  [TRACE].
log4j: runwar.server level set to TRACE
log4j: Adding appender named [console] to category [runwar.server].
log4j: Retreiving an instance of org.apache.log4j.Logger.
log4j: Setting [runwar.security] additivity to [false].
log4j: Level value for runwar.security is  [].
log4j: runwar.security level set to DEBUG
log4j: Adding appender named [console] to category [runwar.security].
log4j: Retreiving an instance of org.apache.log4j.Logger.
log4j: Setting [io.undertow.servlet] additivity to [false].
log4j: Level value for io.undertow.servlet is  [].
log4j: io.undertow.servlet level set to DEBUG
log4j: Adding appender named [console] to category [io.undertow.servlet].
log4j: Level value for root is  [INFO].
log4j: root level set to INFO
log4j: Adding appender named [console] to category [root].
denuno commented 6 years ago

The log4j.debug property should be fixed now, but we're going to need to discuss logging... instead of levels we should use profiles, as there are lots of knobs to twist now... input welcome once you can actually test again. :smiley:

bdw429s commented 6 years ago

@denuno The crazy debugging is gone, but the original Log4J messages are present the first time an HTTP call is made. This is so easy to test. Just fire up box and run a command that hits HTTP such as forgebox show coldbox and you'll see this output:

log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
denuno commented 6 years ago

If you ever want to turn this back on, just pass -Dlog4j.debug=true. :smiley: I think it's all good now as I've switched to a programmatic configuration.

bdw429s commented 6 years ago

@denuno This is not fixed. I'm testing the very latest 3.8.1 build from cfmlprojects and the first HTTP call made after I load up the CLI is outputting these messages to the console.

log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

Did you put in a fix that worked for you after I reported this again on the 2nd? This has been broken in every single build of runwar so far with the possible exception of one of the very early 3.8.0 ones.

bdw429s commented 6 years ago

It seems these warnings are finally gone.