log4jsmbapache-chainsaw

Configuring Chainsaw to read logs from file via network share


I need to to read a Log4j log that is stored on a remote location via Windows network share.

I tried to mount that share as local drive in Windows (L:, what a fantasy...) and then tried to configure the LogFilePatternReceiver in Chainsaw with the pattern I know.

The problem is that, while I'm still able to read the file from Windows, I'm unable to let Chainsaw start listening to the log.

File path in Chainsaw is file://l:/catalina.out, but I get

Throwable
java.net.UnknownHostException: l
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.NetworkClient.openServer(Unknown Source)
    at sun.net.ftp.FtpClient.openServer(Unknown Source)
    at sun.net.ftp.FtpClient.openServer(Unknown Source)
    at sun.net.www.protocol.ftp.FtpURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Unknown Source)
    at java.net.URL.openStream(Unknown Source)
    at org.apache.log4j.varia.LogFilePatternReceiver$1.run(LogFilePatternReceiver.java:805)
    at java.lang.Thread.run(Unknown Source)

If I try to change l: with c:, just to try, I get that the file is unavailable (because it doesn't exist on C:).

What could be the possible explanation for the problem? The L: drive, even if is a remote drive, is mounted in Windows and I can access it via shell.

Thank you.


Solution

  • I just tried this using the latest developer snapshot of Chainsaw and it worked fine. I mapped the Y drive to another box and then specified the fileURL as: file:///y:/mylogfile.txt

    Here's a link to the latest developer snapshot...lots of new features, including ability to annotate the log with comments (click in the 'marker' column and add your own notes), search results are gathered in a separate pane, etc..

    http://people.apache.org/~sdeboy/