You can use Log4j Chainsaw V2 to process various log files and collect them into one table, as well as output these events as xml or use the built-in filtering based on the expressions, search and colorize Chainsaw to cut and cube logs.
Steps: - Start the chainsaw V2 - Create a chainsaw configuration file by copying the example configuration file available on the Greetings tab - define one LogFilePatternReceiver 'plugin' entry for each log file that you want to process - Run the chainsaw with this configuration - Each log file will be appear as a separate tab in the user interface. - Pause the "chainsaw" tab and clear events from this tab - Create a new tab that combines events from different tabs by going to the menu item "view, crate custom expression logpanel" and enter "level> = DEBUG" in the field. It will create a new tab containing events from all tabs with> = debug level (which is why you have cleared the chainsaw log tab).
You can get an overview of the syntax of an expression used to filter, colorize, and search from a tutorial (available in the Help menu).
If you do not want to use Chainsaw, you can do something similar - run a simple application that does not register, but loads the log4j.xml configuration file using the "plugin" entries that you defined for the Chainsaw configuration, but also define FileAppender with xmllayout - All events received by the "receivers" will be sent to one application.
Scott
source share