Is is possible ot configure Chainsaw to read log files that have been customized into regular text, rather than into an XML Layout? And if so, how would I go about doing that?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes it is possible to have Chainsaw read a regular text log file.
The easiest way to do it is to use the latest developer snapshot of Chainsaw, available here: http://people.apache.org/~sdeboy – a Mac DMG is available, as is a tarball containing binaries and shell scripts for linux and windows. There are a ton of new features and performance improvements.
If you used a log4j fileappender definition to create the log file, you can use the File-Load Chainsaw configuration menu, use the first selected option (use fileappender entries from a config file), and browse to your log4j configuration file.
You can then save this programmatically-generated configuration from that screen, and auto-load that newly-created configuration each time Chainsaw starts if you’d like by checking the box at the bottom.
If you didn’t use log4j to generate the file (Chainsaw doesn’t care what created the log file), you can use the ‘process a log file’ option and create the definition yourself by hand using the ‘log file format’, and either a patternlayout definition or Chainsaw’s LogFilePatternReceiver pattern syntax.
Chainsaw will generate a configuration file that will read the log file, and it will parse and tail the log file and automatically process updates to the file. Even if the file is deleted and regenerated, Chainsaw will continue to tail the file.
Let me know if you have more questions, or feel free to ask on the log4j-user mailing list.