I'm fairly certain that we are using log4j for our logging. There is a
log4j directory that gets created when our product is installed and it
contains the following configuration files:
appenders.xml
debugloggers.xml
remoteServiceLog4jConfig.xml
serviceLog4jConfig.xml
serviceLoggers.xml
Perhaps the settings that normally reside in log4j.properties resides in
one of these files. Here's the top portion of appenders.xml:
<!-- For log4j to automatically pick up your modifications to this
file at runtime, -->
<!-- you must modify (at least touch) the main log4j configuration
file, serviceLog4jConfig.xml. -->
<!--- APPENDERS TO LOG REMOTELY -->
<appender name="LOG_REMOTELY"
class="com.brio.one.services.mgmt.logging.LoggingServiceAppender">
<errorHandler
class="com.brio.one.services.mgmt.log4jservice.Log4jServiceErrorHandler"
>
<param name="RetryIntervalInSeconds" value="30" />
<root-ref/>
<appender-ref ref="BACKUP_MESSAGES_FILE" />
</errorHandler>
<filter class="com.brio.one.mgmt.logging.SequenceNumberFilter"/>
</appender>
<appender name="BACKUP_MESSAGES_FILE"
class="org.apache.log4j.CompositeRollingAppender">
<param name="File"
value="${directory}/log/${name}_backupMessages.log" />
<!-- Select rolling style (default is 2): 1=rolling by size,
2=rolling by time, 3=rolling by size and time. -->
<param name="RollingStyle" value="2"/>
<!-- If rolling style is set to 2 then by default log file will
be rolled every 12 hours. -->
<param name="DatePattern" value="'.'yyyy-MM-dd-a"/>
<!-- If rolling style is set to 1 then by default log file will
be rolled when it reaches size of 5MB. -->
<param name="MaxFileSize" value="5MB"/>
<!-- This is log file rotation number. This only works for log
files rolled by size-->
<param name="MaxSizeRollBackups" value="5"/>
<layout class="com.brio.one.mgmt.logging.xml.XMLFileLayout">
</layout>
</appender>
<!-- ** ASYNCHRONOUS LOGGING APPENDER ** -->
<appender name="SEND_TO_LOGGING_SERVICE_ASYNC"
class="org.apache.log4j.AsyncAppender">
<param name="BufferSize" value="128" />
<appender-ref ref="LOG_REMOTELY" />
</appender>
-----Original Message-----
From: Paul Smith [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 14, 2005 7:11 PM
To: Log4J Users List
Subject: Re: Help with setting up chainsaw with log4j
From your original message you say you cannot find a
log4j.properties file that is being used to manage log4j, and looking
more closely at the xml output example you have given is it doesn't
look like the xml format log4j would use.
Do you have access to your source code to see how log4j is being
configured? Perhaps there is another log4j file somewhere that is
being explictly referenced on application startup.
Alternatively, your application may not be using log4j to log
anything (log4j just may be required by one of the libraries in use
by your application).
Paul
On 15/06/2005, at 12:06 PM, Oliver Pike wrote:
> I unfortunately don't have access to the source code. My company
> bundles
> log4j with our application and I'm assuming that we would output
> our log
> files in a format that would be compatible with a log4j viewer. Maybe
> you could send me a log file that is in the valid format and I could
> compare the two? Also, is there any logging I can turn on in
> Chainsaw to
> see if it's having a problem parsing the log file I'm using?
>
> -----Original Message-----
> From: Paul Smith [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 14, 2005 6:48 PM
> To: Log4J Users List
> Subject: Re: Help with setting up chainsaw with log4j
>
> mmm, and you're using the XMLLayout I'm assuming when writing this
> log file?
>
> Paul
>
> On 15/06/2005, at 11:19 AM, Oliver Pike wrote:
>
>
>> Np. Started up the webstart version, used "File->Load Log4J
>> File..." and
>> selected the same log file as before. No response.
>> Then I tried dragging and dropping the same log file on to the
>> "Drag &
>> Drop XML log files here" tab, and in the status bar I see the
>> message:
>> "Loading C:\Program
>> Files\Hyperion\HPS8\BrioPlatform\log
>> \BrioPlatform1_Opike1_172_1800_messa
>> ge_ServiceBroker.log", but then nothing happens after that.
>>
>> -----Original Message-----
>> From: Paul Smith [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, June 14, 2005 6:02 PM
>> To: Log4J Users List
>> Subject: Re: Help with setting up chainsaw with log4j
>>
>> Could you try the newer version of Chainsaw (webstart link) and use
>> the File->Open mechainsm to browse for the same file? Should
>> work... It's been sooooooooooooo long since I'v used the old
>> Chainsaw and worked with that code.
>>
>> Paul
>>
>> On 15/06/2005, at 10:54 AM, Oliver Pike wrote:
>>
>>
>>
>>> Thanks for the reply. Right now I'm trying to use the embedded
>>> chainsaw.
>>> I kick it off by running:
>>> java org.apache.log4j.chainsaw.Main
>>>
>>> Chainsaw does come up however there is an exception thrown:
>>> log4j:ERROR Could not connect to remote log4j server at
>>> [localhost]. We
>>> 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)
>>> at
>>> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
>>> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:
>>> 158)
>>> at java.net.Socket.connect(Socket.java:452)
>>> at java.net.Socket.connect(Socket.java:402)
>>> at java.net.Socket.<init>(Socket.java:309)
>>> ...
>>>
>>> The Chainsaw window comes up empty. I select "File->Load File" and
>>> point
>>> it to one of the xml formatted log files that the parent
>>> application is
>>> generating. Chainsaw displays a message "Loaded 0 events" and after
>>> clicking "ok" the window remains empty. Here's a snapshot of the
>>> contents of the log file to show how it is formatted:
>>>
>>> <event logger="root" timestamp="1118713924311" level="WARN"
>>> thread="SB1_OPIKE1" sequence_no="330">
>>> <time>13 Jun 2005 18:52:04,311</time>
>>> <context originator_type="ServiceBroker"
>>> originator_name="SB1_OPIKE1"
>>> host="OPIKE1"/>
>>> <message><![CDATA[Server Available...]]></message>
>>> </event>
>>>
>>> <event logger="com.sqribe.transformer.ServiceBroker"
>>> timestamp="1118713924321" level="ALWAYS" thread="SB1_OPIKE1"
>>> sequence_no="332">
>>> <time>13 Jun 2005 18:52:04,321</time>
>>> <context originator_type="ServiceBroker"
>>> originator_name="SB1_OPIKE1"
>>> host="OPIKE1"/>
>>> <message><![CDATA[Server Available...]]></message>
>>> </event>
>>>
>>> Thanks,
>>> Ollie
>>>
>>> -----Original Message-----
>>> From: Paul Smith [mailto:[EMAIL PROTECTED]
>>> Sent: Tuesday, June 14, 2005 3:09 PM
>>> To: Log4J Users List
>>> Subject: Re: Help with setting up chainsaw with log4j
>>>
>>> Chainsaw within the log4j 1.2.x series can be started by following
>>> the instructions here:
>>>
>>> http://logging.apache.org/log4j/docs/api/org/apache/log4j/chainsaw/
>>> package-summary.html
>>>
>>> The new version 2 of Chainsaw can be started via Java Webstart:
>>>
>>> http://logging.apache.org/log4j/docs/webstart/chainsaw/
>>> chainsawWebStart.jnlp
>>>
>>> Check here for more information on the new version of Chainsaw (you
>>> can download a standalone bundle of it if you want):
>>>
>>> http://logging.apache.org/log4j/docs/chainsaw.html
>>>
>>> Configuration of Chainsaw v2 is relatively simple, if you setup your
>>> remote application appender as follows:
>>>
>>> log4j.rootLogger=DEBUG, CHAINSAW_CLIENT
>>>
>>> log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketAppender
>>> log4j.appender.CHAINSAW_CLIENT.RemoteHost=localhost
>>> log4j.appender.CHAINSAW_CLIENT.Port=4445
>>>
>>> (this assumes you're debugging locally, using localhost as the
>>> location to broadcast to, you can use a SocketHubAppender in the
>>> reverse fashion with multiple Chainsaw clients able to connect to
>>> the
>>> same application)
>>>
>>> Then start Chainsaw v2, it should pop up and ask if you want to
>>> start
>>> a Receiver, choose a matching SocketReceiver (or SocketHubAppender)
>>> and the correct port, and you should be ok.
>>>
>>> Just watch out for the different version of log4j. Chainsaw v2 uses
>>> the new log4j 1.3 Alpha code-base, and the LocationInfo from a log4j
>>> 1.2.x series application has some oddities.
>>>
>>> Hope that helps.
>>>
>>> cheers,
>>>
>>> Paul Smith
>>>
>>> On 14/06/2005, at 2:30 PM, Oliver Pike wrote:
>>>
>>>
>>>
>>>
>>>> I'm working with an application that uses log4j as its logging
>>>> mechanism
>>>> and I want to use Chainsaw. It comes bundled with log4j.jar. I
>>>> can't
>>>> find a log4j.properties anywhere with the application, but within
>>>> log4j.jar there's a file, defaultconfig.properties whose contents
>>>> are:
>>>>
>>>>
>>>>
>>>> # For the general syntax of property based configuration files see
>>>> the
>>>>
>>>> # documenation of org.apache.log4j.PropertyConfigurator.
>>>>
>>>>
>>>>
>>>> # The root category uses the appender called A1. Since no
>>>> priority is
>>>>
>>>> # specified, the root category assumes the default priority for
>>>> root
>>>>
>>>> # which is DEBUG in log4j. The root category is the only category
>>>> that
>>>>
>>>> # has a default priority. All other categories need not be
>>>> assigned a
>>>>
>>>> # priority in which case they inherit their priority from the
>>>>
>>>> # hierarchy.
>>>>
>>>>
>>>>
>>>> log4j.rootCategory=, A1
>>>>
>>>>
>>>>
>>>> # A1 is set to be a LogMonitorAppender which outputs to a swing
>>>>
>>>> # logging console.
>>>>
>>>>
>>>>
>>>> log4j.appender.A1=org.apache.log4j.lf5.LF5Appender
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> I'm guessing I need to make some changes to this file?
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Ollie
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> --------------------------------------------------------------------
>>> -
>>> 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]
>>>
>>>
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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]
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> 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]
>
>
>
---------------------------------------------------------------------
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]