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 < [email protected]> 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 <[email protected]> > > > 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 <[email protected]> > > 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 < > > > [email protected]> 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... >
