logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gao Jun" <j...@patternware.com>
Subject Problem in using socketAppender
Date Mon, 03 Dec 2001 03:42:26 GMT
Hi, all,
     I started to use Log4j a few days ago, it's really cool. But I've met
a problem I don't know whether it is a known bug or I've made soem mistake.
It's like this:
     I run a client process, which will output log to the socketServer appender.
I run a SocketServer to receive these log messages, and I have set the .lcf
file in the server side to make it output to console and file, it works. Then I
wanted to try SMTP appender in the server side, I mean I want to email the
received log message from the cient side out to a third place--the email receiver.
But I failed, I can do this in the first place, I mean, from the client side, email
it out, but I can't do this from the socketServer's place. I don't know why.
Below is the client side lcf and server side lcf. Can anybody answer this 
question?  Thanks.
client side .lcf:
# The root category uses the appender called A1. 

log4j.rootCategory=DEBUG, A1

# A1 is set to be a SocketAppender sending its output to the server
running on the local host, port 5000.

server side .lcf:
log4j.rootCategory= , A1, A2

# A1 is set to be ConsoleAppender sending its output to System.out

# A1 uses PatternLayout.

# The conversion pattern consists of date in ISO8601 format, priority,
# thread name, category name truncated to its rightmost two components
# and left justified to 17 characters, location information consisting
# of file name (padded to 13 characters) and line number, nested
# diagnostic context, the and the application supplied message

log4j.appender.A1.layout.ConversionPattern=%d %-5p [%t] %-17c{2} (%13F:%L) %3x - %m%n


Gao, Jun
patternWare Systems, Inc.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message