Entropy
Entropy

Reputation: 1271

Chainsaw and plaintext log4j

I am trying to learn how to use Chainsaw. I have a text log4j file in SystemOut.log with rolling files. I set the file URL in a file pattern receiver to file:///C:/AppDev/prodlogs/SystemOut.log which is where I copied production logs to. The pattern is [TIMESTAMP] THREAD * LEVEL [*] (FILE:LINE) - MESSAGE. Timestamp format is MM/dd/yyyy HH:mm:ss:SSS EDT.

Yet, when I set all of this. Nothing happens. No tabs pop up, even if I restart the receiver or try to manually use the File->Load Log4j File menu. No errors pop up or anything. Just...nothing.

What am I doing wrong?

Upvotes: 1

Views: 422

Answers (2)

Scott
Scott

Reputation: 1736

Try the latest developer snapshot of Chainsaw, available at http://people.apache.org/~sdeboy

There are a lot of new features in the developer snapshot.

Are you using a pattern layout? I assume so. Chainsaw has built-in support for log4j's pattern layout.

  • Select 'process a log file' from the 'Load Chainsaw configuration' menu item.
  • specify the log file URL
  • change the 'log file format type' to PatternLayout
  • specify the pattern layout
  • specify the timestamp format

Choose the 'always start Chainsaw with this configuration' or just save the configuration off as an xml file so you can use it later from this same dialog (just select the 'Use a chainsaw config file' option if you reload this config.

If you still have problems, feel free to include a few lines of your log file.

Upvotes: 0

xav
xav

Reputation: 5608

I don't really know why it doesn't work, yet it's been a while now that Chainsaw didn't receive any update: the last version v1.99.99 was built in 2006.

I would recommend using something like LogMX (or some of its clones) instead. You simply have to put your Log4j pattern (or any other pattern) in its configuration (i.e. new "Parser") to be able to parse, view, filter, search, monitor in real-time, ... (don't need to purchase a license, the free version already does more than Chainsaw in my opinion).

Upvotes: 1

Related Questions