if you have the log4j.properties on the classpath in the file just add

log4j.logger.org.apache.struts = warn

that will stop the struts stuff



On Tuesday 25 March 2003 10:58 am, Martin Monsorno wrote:
> Hi *,
>
> when starting my struts-enabled web-app, I get output like this
>
> ,----
>
> | [INFO] PropertyMessageResources - -Initializing,
> | config='org.apache.struts.util.LocalStrings', returnNull=true [INFO]
> | PropertyMessageResources - -Initializing,
> | config='org.apache.struts.action.ActionResources', returnNull=true [INFO]
> | PropertyMessageResources - -Initializing,
> | config='org.apache.struts.webapp.example.AlternateApplicationResources',
> | returnNull=true [INFO] PropertyMessageResources - -Initializing,
> | config='org.apache.struts.webapp.example.ApplicationResources',
> | returnNull=true [INFO] MemoryDatabasePlugIn - -Initializing memory
> | database plug in from '/WEB-INF/database.xml' [INFO] ValidatorPlugIn -
> | -Loading validation rules file from '/WEB-INF/validator-rules.xml'
> |
> | ...
>
> `----
>
> printed to stdout.
>
> My log4j configuration looks like this:
>
> ,----
>
> | # root category
> | log4j.rootCategory=ERROR, Console
> | # apache stuff
> | log4j.category.org.apache=ERROR, Apache
> | log4j.additivity.org.apache=false
> |
> | #######################################################################
> | # apache
> | #######################################################################
> | log4j.appender.Apache=org.apache.log4j.FileAppender
> | log4j.appender.Apache.File=${log.dir}/apache.log
> | log4j.appender.Apache.layout=org.apache.log4j.PatternLayout
> | log4j.appender.Apache.layout.ConversionPattern=[%p,%c] %m%n
> |
> | #######################################################################
> | # the console appender for everything else
> | #######################################################################
> | log4j.appender.Console=org.apache.log4j.ConsoleAppender
> | log4j.appender.Console.layout=org.apache.log4j.PatternLayout
> | log4j.appender.Console.layout.ConversionPattern=[%p,%c] %m%n
>
> `----
>
> So, obviously, struts (or better say commons?), is not interested in
> my log4j configuration: it prints INFO messages to stdout, but should
> only print ERROR messages to the specified log-file.
>
> How can I configure this?  Any help is appreciated.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to