logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Esther Parrilla-Endrino <eparril...@gmail.com>
Subject Re: Help needed using VFSLogFilePatternReceiver
Date Thu, 05 Nov 2009 18:16:26 GMT
Hi again,

Thanks a lot for your responses Scott, browsing previous emails from you I
have managed to display the file remotely via VFS, the only thing that is
not working is the tailing of the file, this is my scenario:

1. I have a test class that saves messages every second to a log file.
2. I have configured my JNLP and .chainsaw/plugins to include the necessary
jars, some of them signed and http-client and commons-codec not signed and
linked in a separate JNLP file.
3. I launch Chainsaw using Java Web Start JNLP file successfully, I choose
my config file and the VFS receiver is created at the right and the
chainsaw-log tab show the first 274 messages saved in the remote log file,
so Chainsaw can connect and display the remote file!!!

OK, that is great but now comes the problem, after the message number 274 in
my chainsaw.-log tab I see the following DEBUG messages:


Resorting to protocol version default close connection policy
Should NOT close connection, using HTTP/1.1
Releasing connection back to connection manager.
Freeing connection, hostConfig=HostConfiguration[host=http://myhost:8080]
Adding connection at: 1257444005417
Notifying no-one, there are no waiting threads

And that's all, no new messages are appended to the display :-(

What does it means? Why Chainsaw has stopped to show messages and do not
tail the file?

The only thing I have found different from the configuration proposed by you
in previous messages of this list is that I am using
commons-httpclient-3.1.jar instead of version 1.3 you proposed.

I have tried to download version 1.3 from Apache site but I could not find
it as the oldest version of this jar file placed there is version 2.0.

Do you know if I could download that jar file from any other location?

Thanks a lot for your help!




2009/10/20 Scott Deboy <scott.deboy@gmail.com>

> To use VFS via Web Start, you need to add the vfs-related jars to your
> $user/.chainsaw/plugins folder, and then go to Chainsaw's application-wide
> preferences screen and check 'ok to remove security manager'.  After
> restarting Chainsaw, everything should work (again, to tail http using VFS
> receiver I also had to download Jakarta commons-codec and Jakarta
> httpclient
> 1.3.
>
> Here's a page with more information:
> http://logging.apache.org/chainsaw/distributionnotes.html
>
> Hope that helps.
>
> Scott
> On Tue, Oct 20, 2009 at 3:24 AM, Esther Parrilla-Endrino <
> eparrillae@gmail.com> wrote:
>
> > Hi Scott,
> >
> > Thanks for your responses, well I have  tried several things and still it
> > is
> > not working properly :/
> >
> > The latest thing I have tried is that I have placed all Chainsaw signed
> > jars
> > and JNLP in a static folder of my Tomcat 6.0 java server, here is my
> JNLP:
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <!-- JNLP File for Jakarta Log4j Chainsaw v2 Application -->
> > <jnlp
> >  spec="1.0+"
> > codebase="http://myHost:8080/chainsaw/"
> >  href="chainsawWebStart.jnlp">
> >  <information>
> >    <title>Chainsaw Log Console</title>
> >    <vendor>Apache</vendor>
> >    <homepage href="http://logging.apache.org/log4j"/>
> >    <description>A Log4j log viewing application</description>
> >    <description kind="short">A Log4j log viewing
> application</description>
> >    <icon href="http://logging.apache.org/log4j/docs/images/logo.jpg"/>
> >    <icon kind="splash" href="
> > http://logging.apache.org/log4j/docs/images/logo.jpg"/>
> >    <offline-allowed/>
> >  </information>
> >  <security>
> >      <all-permissions/>
> >  </security>
> >  <resources>
> >    <j2se version="1.5+" max-heap-size="256m"/>
> >    <jar href="lib/log4j-chainsaw-2.0alpha-1.jar"/>
> >    <jar href="lib/jakarta-oro-2.0.6.jar"/>
> >    <jar href="lib/log4j-1.3alpha-7.jar"/>
> >    <jar href="lib/log4j-optional-1.3alpha-7.jar"/>
> >    <jar href="lib/log4j-oro-1.3alpha-7.jar"/>
> >    <jar href="lib/log4j-smtp-1.3alpha-7.jar"/>
> >    <jar href="lib/log4j-xml-1.3alpha-7.jar"/>
> >    <!--<jar href="lib/log4j-zeroconf.jar"/>-->
> >    <jar href="lib/xstream-1.1.2.jar"/>
> >    <jar href="lib/commons-vfs-1.0.jar"/>
> >    <jar href="lib/commons-logging-api.jar"/>
> >    <!--<jar href="lib/jmdns.jar"/>-->
> >    <jar href="lib/log4j-chainsaw-vfs.jar"/>
> >    <jar href="lib/log4j-db-1.3alpha-7.jar"/>
> >    <jar href="lib/log4j-jms-1.3alpha-7.jar"/>
> >    <property name="org.apache.commons.logging.Log"
> > value="org.apache.commons.logging.impl.Log4JLogger"/>
> >  </resources>
> >  <application-desc main-class="org.apache.log4j.chainsaw.LogUI"/>
> > </jnlp>
> >
> > I can succesfully launch Chainsaw using Java Web Start, then I select to
> > load my config file which is the following one:
> >
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <!DOCTYPE log4j:configuration >
> > <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
> > debug="true">
> >
> >   <!-- REMOTE FILE RECEIVER -->
> >   <plugin name="VFSLogFilePatternReceiver"
> > class="org.apache.log4j.chainsaw.vfs.VFSLogFilePatternReceiver">
> >     <param name="fileURL" value="
> > http://myHost:8080/chainsaw/logs/example.log"/>
> >      <param name="timestampFormat" value="yyyy-MM-dd HH:mm:ss,SSS"/>
> >     <param name="logFormat" value="TIMESTAMP LEVEL [LOGGER] MESSAGE"/>
> >      <param name="name" value="MyHttpReceiver"/>
> >      <param name="promptForUserInfo" value="false"/>
> >     <param name="tailing" value="true"/>
> >   </plugin>
> >   <root>
> >      <level value="DEBUG"/>
> >   </root>
> >
> >   <logger name="org.apache.log4j">
> >      <level value="OFF"/>
> >   </logger>
> >
> > </log4j:configuration>
> >
> > The idea would be:
> >
> > 1. Launch Chainsaw remotely using Java Web Start (OK)
> > 2. Load the config file above that created an VFS receiver to retrieve
> the
> > file example.log file via HTTP GET. This file is placed too in the same
> > Tomcat static folder.
> > 3. Display the file and tail its contents.
> >
> > The problem is that once I load the config file I can see the new
> Receiver
> > at the right and in the chainsaw-log tab appears the message at the end:
> >
> > "VFSLogFilePatternReceiver started!"
> >
> > But I see no new tab for the log messages and the remote log file is not
> > loaded.
> >
> > What else do I have to configure?
> > To get remote files via HTTP GET using VFS do I have to place them in
> > Apache
> > Httpd? Tomcat do not  allow this retrieval?
> >
> > Any help wpuld be appreciatted, the Tool really covers what we need for
> > logging and is a shame maybe we cannot use it due to some
> misconfiguration
> > in our side :-(
> >
> >
> >
> > 2009/10/16 Scott Deboy <scott.deboy@gmail.com>
> >
> > > I'm able to tail a log file via http with nginx-0.7.62, so I suspect
> > > support
> > > for range header is the issue (or you're using an old version of
> > > VFSLogFilePatternReceiver, haven't tried the 'currently released'
> version
> > > in
> > > a while).
> > >
> > > Scott
> > >
> > > On Fri, Oct 16, 2009 at 12:15 AM, Scott Deboy <scott.deboy@gmail.com>
> > > wrote:
> > >
> > > > For me to tail http content using VFSLogFilePatternReceiver, I had to
> > > pull
> > > > down an older version of httpclient (1.3) and commons-codec (since
> > > > commons-vfs uses apis from httpclient 1.3).
> > > >
> > > > VFS uses the 'range' header to request specific bytes (tail the
> file),
> > so
> > > > maybe your web server doesn't support that header (that's what I'm
> > seeing
> > > > with nanoHTTPD).  I'll try with a different server that does support
> > that
> > > > header just to make sure everything's working..
> > > >
> > > > Scott
> > > >
> > > >
> > > > On Thu, Oct 15, 2009 at 7:00 AM, Esther Parrilla-Endrino <
> > > > eparrillae@gmail.com> wrote:
> > > >
> > > >> Hi folks!
> > > >>
> > > >> I would like to read, display and do a near-real-time tail of a
> remote
> > > log
> > > >> file stored in a Tomcat server using Chainsaw (the files shall be
> > > >> retrieved
> > > >> using HTTP GET).
> > > >>
> > > >> I have been able to configure the VFSLogFilePatternReceiver ,
> install
> > > all
> > > >> 3rd party libraries etc... and once I launch Chainsaw I can see the
> > new
> > > >> receiver tab and the first bunch of messages of my remote log file
> but
> > > >> even
> > > >> though I have set the "tailing" flag to "true" the file is not
> > > refreshed.
> > > >>
> > > >> The last messages I have in my display are:
> > > >>
> > > >> Releasing connection back to connection manager
> > > >> Freeing connection, hostConfig=HostConfiguration[host=
> > > >> http://remotehost:8080
> > > >> ]
> > > >> Adding connection at: 12556119101
> > > >> Notifying no-one, there are no waiting threads
> > > >>
> > > >> My configuration file is the following one:
> > > >>
> > > >> <?xml version="1.0" encoding="UTF-8" ?>
> > > >> <!DOCTYPE log4j:configuration >
> > > >> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
> > > >> debug="true">
> > > >>
> > > >>   <!-- REMOTE FILE RECEIVER -->
> > > >>   <plugin name="VFSLogFilePatternReceiver"
> > > >> class="org.apache.log4j.chainsaw.vfs.VFSLogFilePatternReceiver">
> > > >>     <param name="fileURL" value="http://remotehost:8080/logs/my.log
> > "/>
> > > >>     <param name="timestampFormat" value="yyyy-MM-dd HH:mm:ss,SSS"/>
> > > >>     <param name="logFormat" value="TIMESTAMP LEVEL [LOGGER]
> MESSAGE"/>
> > > >>     <!--<param name="logFormat" value="TIMESTAMP [THREAD] LEVEL
> LOGGER
> > > >> (FILE:LINE) - MESSAGE"/>-->
> > > >>     <param name="name" value="ExampleHttpReceiver"/>
> > > >>     <param name="promptForUserInfo" value="false"/>
> > > >>     <param name="tailing" value="true"/>
> > > >>   </plugin>
> > > >>   <root>
> > > >>      <level value="DEBUG"/>
> > > >>   </root>
> > > >>   <logger name="org.apache.log4j">
> > > >>      <level value="OFF"/>
> > > >>   </logger>
> > > >> </log4j:configuration>
> > > >>
> > > >> I have the following jar files in my "$HOME/.chainsaw/plugins/"
> > folder:
> > > >>
> > > >> commons-logging-1.1.1.jar
> > > >> commons-vfs-1.0.jar
> > > >> log4j-chainsaw-vfs.jar
> > > >>
> > > >> Is there anything else I have missed in my installation?
> > > >> Does VFS support HTTP GET remote files retrieval with refreshing?
> > > >>
> > > >> Thanks in advance,
> > > >>
> > > >> e
> > > >>
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > Because code matters more than commercials...
> >
>



-- 
Because code matters more than commercials...

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