net.logAnalyzer
Class LogAnalyzerBatch

java.lang.Object
  extended bynet.logAnalyzer.LogAnalyzerBatch
All Implemented Interfaces:
LALogHandlerListener

public final class LogAnalyzerBatch
extends java.lang.Object
implements LALogHandlerListener

This class is the command line executable for Log LAAnalyzer. It is used to analyze the specified log file and to launch the GUI according to command lines options.

Threaded log file analysis

The log file analysis is launch in a new Thread to allow progress logging using the following LALogHandlerListener events :

Command line options

java -jar logAnalyzer.jar LogAnalyzerBatch [-gui] [-reportsprefix prefix] commandsfile.xml logfile+

Argument Description
-gui Starts the GUI after analyzing and reports rendering processes.
-reportsprefix prefix Adds this prefix to each generated report file.
commandsfile.xml XML file containing options and commands to execute during parsing and analysis of the log file (see documentation for details).
logfile(s) One or more log files to parse and analysis. Each line of the file will be parsed using the pattern (specified in the XML commands file).
If more than one log file is specified, they are parsed as one big file.

Content of the XML commands file

This file contains options and commands according to the DTD LogAnalyzeCommands.dtd (see this DTD for details).


Constructor Summary
LogAnalyzerBatch()
          Default constructor.
 
Method Summary
 void addLogAnalyzerListener(LogAnalyzerBatchListener listener)
          Adds a listener.
 void endParsing(LALogHandler logHandler)
          Called by a LALogHandler when the parsing is done.
 void fireMessage(java.lang.String message)
          Fires a message event.
 void firePercent(int percent)
          Fires a percent event.
static StartUpOptions getOptions()
          Start up options.
static void main(java.lang.String[] args)
          Entry point.
 void removeLogAnalyzerListener(LogAnalyzerBatchListener listener)
          Removes a listener.
 void setOptions(StartUpOptions options)
          Sets the start up options.
 void startParsing(LALogHandler logHandler)
          Called by a LALogHandler when the parsing process starts.
 void stepParsing(LALogHandler logHandler)
          Called by a LALogHandler when the parsing process reaches a step beyond.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogAnalyzerBatch

public LogAnalyzerBatch()
Default constructor.

Method Detail

main

public static void main(java.lang.String[] args)
Entry point. Gets the command line arguments and runs a new LogAnalyzerBatch instance.

Parameters:
args - Command line arguments.

getOptions

public static StartUpOptions getOptions()
Start up options.

Returns:
Returns the options.

setOptions

public void setOptions(StartUpOptions options)
Sets the start up options.

Parameters:
options - The options to set.

startParsing

public void startParsing(LALogHandler logHandler)
Called by a LALogHandler when the parsing process starts. Sets internal properties.

Specified by:
startParsing in interface LALogHandlerListener
Parameters:
logHandler - Log handler currently prased.
See Also:
LALogHandlerListener.startParsing(LALogHandler)

stepParsing

public void stepParsing(LALogHandler logHandler)
Called by a LALogHandler when the parsing process reaches a step beyond. Sets internal properties and show parsing progression in debug mode.

Specified by:
stepParsing in interface LALogHandlerListener
Parameters:
logHandler - Log handler currently parsed.
See Also:
LALogHandlerListener.stepParsing(LALogHandler)

endParsing

public void endParsing(LALogHandler logHandler)
Called by a LALogHandler when the parsing is done. Sets internal properties.

Specified by:
endParsing in interface LALogHandlerListener
Parameters:
logHandler - Log handler currently parsed.
See Also:
LALogHandlerListener.endParsing(net.logAnalyzer.handlers.LALogHandler)

addLogAnalyzerListener

public void addLogAnalyzerListener(LogAnalyzerBatchListener listener)
Adds a listener.

Parameters:
listener - Lister to add.

removeLogAnalyzerListener

public void removeLogAnalyzerListener(LogAnalyzerBatchListener listener)
Removes a listener.

Parameters:
listener - Lister to remove.

fireMessage

public void fireMessage(java.lang.String message)
Fires a message event.

Parameters:
message - Message for which to fire an event.

firePercent

public void firePercent(int percent)
Fires a percent event.

Parameters:
percent - Percentages.


Copyright © 2006 null. All Rights Reserved.