David,
I am not very familiar with maven-jetty6-plugin. However, from what
you describe, it looks like jetty is using SLF4J's SimpleLogger
binding instead of its log4j binding. This is attested by the
following line:
2 [main] INFO org.mortbay.log - Logging to
[EMAIL PROTECTED] via org.mortbay.log.Slf4jLog
When Jetty uses SLF4J's SimpleLogger binding log4j configuration files
have no affect as log4j is not used by Jetty. You need to instruct
Maven or Jetty to use the correct binding. For more details on SLF4J
bindings please see http://www.slf4j.org.
> Hello all -
>
> Could anyone help me to understand how to change the log level that
> the maven-jetty6-plugin uses? I would like to put debug logging
> statements into my code, but then I can't seem to figure out how to
> get the plugin to change from its default info level. I would also
> like to set different logging levels on package name.
>
> Note also that I am using the Spring framework. So first I tried
> using its Log4jConfigListener web util class in web.xml and pointing
> it at my log4j.properties file. Info messages appeared indicating
> that it was alive and had read my configuration:
>
> 929 [main] INFO /myapp - Initializing Log4J from [/Users/davidm/
> dev/myapp/src/main/resources/webapp/WEB-INF/log4j.properties]
>
> But no changes were evident in the logged message, neither in format
> nor level.
>
> Then I found a posting on Gmane that indicated you can give Jetty
> your own log4j.properties file by configuring a systemProperty named
> "log4j.configuration", which I did in pom.xml. Again, messages
> indicated that Jetty recognized my property setting:
>
> [INFO] Property log4j.configuration=/WEB-INF/log4j.properties was
> set
>
> but nothing seemed to change the way it logs. In fact, two lines
> later in the log, there is this message:
>
> 2 [main] INFO org.mortbay.log - Logging to
> [EMAIL PROTECTED] via org.mortbay.log.Slf4jLog
>
> Here's my (very simple) log4j.properties file:
>
> log4j.rootLogger=WARN, stdout
>
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c
> {1}:%L - %m%n
>
> log4j.logger.net.sf.hibernate=WARN
> log4j.logger.net.sf.hibernate.type=WARN
> log4j.logger.org.springframework=WARN
>
> I read Jetty's tutorial on logging, but it :
> http://www.mortbay.org/jetty/tut/logging.html
>
> Finally, I gave the "-DDEBUG" and "-DDEBUG_PATTERNS=net.sf.hibernate"
> a shot, but these too seemed to be ignored.
>
> I get the feeling that I am clashing somehow with Jetty's own
> logging. Can anyone help me unravel this?
>
> Thanks
> --David
--
Ceki Gülcü
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]