On Mon, 04 Oct 2004 22:56:57 -0600, "Bill Winspur"
<[EMAIL PROTECTED]> said:
> Dan, Thanks for the example logging file. I brought my
> resources/config/log4j.xml into agreement with it (added <appender-
> ref ref="A SocketAppender"/> to the <root> element.), and logging from
> PM is now OK..
Glad to hear it.
>
> .. will try again later. java.net.ConnectException: Connection
> refused: connect at java.net.PlainSocketImpl.socketConnect(Native
> Method) at
> java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
When log4j is using the SocketAppender ( so is in 'push mode' ) it will
spit this message out if when it cannot connect to the specified
host:port.
When using Studio, one usually gets this if they start Tomcat before
bringing up the OXF Monitoring view. The reason for this is that Studio
doesn't do anything with log4j until this view has been opened.
<verbose>
Btw there is an interesting alternative to the SocketAppender that
doesn't have this pbm. If you use the SocketHubAppender ( i.e. pull
mode ) then get the following benefits :
a.) ( very minor ) The error message doesn't appear on start up
the Server.
b.) ( moderate ) You don't have to worry ( as much ) about team mates
'fighting' over the value of 'RemoteHost' property in the log4j.xml.
( Since each developer would want the value to point to his
workstation. )
e.g.
Developer 'a' sits at machine 'b' and has server running on
machine 'c'. So he wants log4j.xml on machine 'c' to contain
RemoteHost=b.
Developer A sits at machine B and has server running on
machine C. So he wants log4j.xml on machine C to contain
RemoteHost=A.
Say developer 'a' checkin and then A updates and gets a's lo4j.xml.
Next time A runs the server he will end up wasting time dealing with
the fact that his log messages are now going to a's machine.
Here's a brief description of how to use the SocketHubAppender.
1. Replace the appender in your existing file with
<appender name="ASocketHubAppender"
class="org.apache.log4j.net.SocketHubAppender" > <param
name="Port"
value="4445"/>
<param name="LocationInfo" value="true"/>
</appender>
2. Create a new file log4j.xml in your Studio workspace. This should
be in a folder that you don't plan on deploying. The contents
should look like
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" >
<log4j:plugin name="x"
class="org.apache.log4j.net.SocketHubReceiver" >
<log4j:param name="Port" value="4446"/>
<log4j:param name="RemoteHost" value="myserver"/>
</log4j:plugin>
</log4j:configuration>
That is, assuming the server machine name is 'myserver'
</verbose>
>
> Question
> ---------
> Given the 'debug="xxx"' attribute on a <param> or <processor>
> element, what associations, if any, is 'xxx' used to implement ?
> --
At the moment the attribute value, 'xxx' using your example,
is just prefixed to the generated debug message. This was
more useful ( way ) back when the Presentation Server didn't
include file and line number info with the debug log messages.
-- Dan S
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
orbeon-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/orbeon-user