kConvertToLog4j.sh

The kConvertToLog4j.sh script converts the JDBC log, Web log, or server log to the log4j XML format. You can view logs in this format with a tool such as Chainsaw (a GUI-based log viewer available at the web site of the Apache Logging Services).

Examples

To convert a Web log to the log4j XML format.

sh ./kConvertToLog4j.sh -webLog apacheLog.txt

To convert a JDBC log to the log4j XML format.

sh ./kConvertToLog4j.sh -jdbcLog jdbc.kintana.log

To convert a serverLog.txt file in text format to the log4j XML format.

sh ./kConvertToLog4j.sh -serverLog serverLog.txt

To convert a server log, JDBC log, and Web log, and then concatenate them in a result log.

sh ./kConvertToLog4j.sh -serverLog serverLog.txt -jdbcLog jdbc.kintana.log -webLogiisLog.txt

For information about usage type.

sh ./kConvertToLog4j.sh -help

where

<Server_Log>

represents the server log to be converted

<JDBC_Log>

represents the jdbc log to be converted

<Web_Log>

represents the Web log to be converted

<Merged_Log>

represents the name of the result log

<Web_Date_Format>

represents the format of date for the Web log

Example

DD/MMM/YYYY:HH:MM:SS

<Web_Date_Regex>

represents a regular expression to match the date in the Web log

<Srv_Date_Format>

represents the date format for the server log

Example

DD/MMM/YYYY:HH:MM:SS

<Srv_Date_Regex>

represents a regular expression to match the date in the server log

<Append>

Determines whether the existing merged log is appended. The default is No.

<Help>

represents a message to display