The other option is to switch yourself to Cowboy mode, and put log4j1.3
on both sides. I think that's a lower risk than it sounds. We're
going to be doing just this where I work as soon as our current release
of our product goes gold, I'll throw in log4j1.3 alpha 1 into the next
release and give it shakedown cruise.
cheers,
Paul
Scott Deboy wrote:
There are none..the class in 1.3 is in a different package from 1.2.8, so java
serialization fails to find the locationInfo class on the Chainsaw side.
Writing an XMLSocketAppender might be the best bet.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Mon 11/22/2004 10:23 AM
To: Log4J Users List
Cc:
Subject: RE: SocketAppender questions
Scott, what are my 1.3 options for the SocketAppender + locationinof
functionality ?
"Scott Deboy" <[EMAIL PROTECTED]>
11/22/2004 01:19 PM
Please respond to "Log4J Users List"
To: "Log4J Users List" <[EMAIL PROTECTED]>
cc:
Subject: RE: SocketAppender questions
Using a 1.2.8 SocketAppender to talk to Chainsaw (1.3) has these
limitations:
no MDC
no LocationInfo
By the way, LocationInfo is created as a by-product of defining any
pattern layout that uses the fields provided by location info. So, if you
are writing to a FileAppender that uses these fields in the PatternLayout
as well as a SocketAppender for Chainsaw, be sure to specify the
SocketAppender first in the list of appenders.
One way to get LocationInfo in Chainsaw from a 1.2.8 client is to have
Chainsaw tail a log file that includes all of the LocationInfo fields in
its patternLayout, and use a LogFilePatternReceiver on the Chainsaw side
to parse and tail the file.
-----Original Message-----
From: Ceki Gülcü [mailto:[EMAIL PROTECTED]
Sent: Mon 11/22/2004 10:01 AM
To: Log4J Users List
Cc:
Subject: Re: SocketAppender questions
At 06:41 PM 11/22/2004, [EMAIL PROTECTED] wrote:
I have defined a very simple SocketAppender to a log4J 1.2.8 client
application
log4j.appender.SockLog=org.apache.log4j.net.SocketAppender
log4j.appender.SockLog.RemoteHost=localhost
log4j.appender.SockLog.Port=4451
#log4j.appender.SockLog.LocationInfo=true
log4j.appender.SockLog.Threshold=WARN
A very simple SocketReceiver is configured for the "listener" server
<plugin name="Log4JSocketReceiver"
class="org.apache.log4j.net.SocketReceiver">
<param name="Port" value="4451"/>
</plugin>
1) I have read about a bug in log4J 1.3 that prevents the LocationInfo
propertery being set to true.
When will this be fixed ? I need the location info for remote
debugging
You are mixing 1.2.8 and 1.3 on the client and server side? This won't
work.
2) When I have the listener server down and run the client application, I
expect only a "couldn't connect" terse error message.
Instead I get the full java.net.ConnectException + stack trace .
Not exactly simply dropped.
Note this is from the initialization code, not subsequent
loggings.
Is there anyway to avoid this message. I want the application to
use the socket if it is available, else ignore it.
(Note that log4perl handles this very situation very cleanly)
This was supposed to be fixed in 1.3.
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]