logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nknk <nkun...@escholar.com>
Subject All log4j messages are going over the Socket?
Date Fri, 31 Oct 2008 14:43:50 GMT

Hi, I have a java web application that will be run in a clustered
environment.  The user would like to consolidate the logs in one file by
writing to the socket and then to a central file.
I have used the org.apache.log4j.net.SocketServer to listen for incoming
log4j messages from the client application. Whatever SocketServer recieves,
it will use a regular File appender to write to a central file.

Here is my problem - no matter what log level is set in the application and
in the properties file for SocketServer, ALL of the log4j messages are
comming across the network through the socket. 
Let's say in the application the level is ERROR and in the properties file
that SocketServer is using to write to the file, the level is also ERROR,
only ERROR messages will be written to the file, but it looks like all the
messages went over the network and SocketServer just filtered the ERROR
ones.  If I change SocketServer's level to DEBUG, I will see all the DEBUG
messages even though Application's level is still set to ERROR.  Our
application has a lot of DEBUG messages and I'm afraid that all the network
traffic will impede preformance.
Is there any way around this? 

Also is there a way to determine that SocketServer is down and stopped
logging messages?
Do I need to to close the socket appender?

Apologies if the questions are trivial..

Thanks for your help
View this message in context: http://www.nabble.com/All-log4j-messages-are-going-over-the-Socket--tp20267368p20267368.html
Sent from the Log4j - Users mailing list archive at Nabble.com.

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message