On 6/16/05, Elliott Yates <[EMAIL PROTECTED]> wrote:
> 1. I'm working with a J2EE application using log4j. We have multiple
> instances of an application server running. Originally we were using the
> same application output file (with DailyRollingFileAppender) but we saw
> resource contention issues with the single copy of the file, especially
> at midnight when each app server attempted to roll it over. Our current
> fix is to extend DailyRollingFileAppender and override the setFile()
> method from FileAppender so that the log file name incorporates the
> server name. Is there a better way to do this?
If you want all of the output from multiple log4j instances to go to
one file I would suggest that all instances use a SocketAppender to
send them and they you have on program that listens
(ServerSocketListener?) and writes them to the file.

> 2. There is at present only one appender logging information, and it is
> quite verbose. I'd like to add another appender temporarily (for
> alerting purposes) that will register only error messages. However, I'd
> like to be able to configure which error messages are logged using the
> run-time configuration file, instead of adding Filters programmatically.
> Is it possible to filter error messages by text-matching based on
> configuration files? (we're currently using flat text key-value pair config 
> files)
I haven't used filters but I know they can be in the config file so
take a close look at them.  You might also look into Chainsaw.

> 3. I have come across the following line in a configuration file:
> log4j.category.log4j.Sort=INFO
> I'm not sure what this .Sort property is doing, and I cannot find it
> used in any example configurations in technical docs on the web. Any
> idea what this is? My assumption is that it is being ignored by log4j
> (as it is unrecognized).
I haven't heard of that either (and I use XML config so I am not
familiar with the properties format).

-- 
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

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

Reply via email to