Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

alma::acs::logging::tools::LogAssistant Class Reference

List of all members.

Public Member Functions

 LogAssistant (String[] args)

Static Public Member Functions

void main (String[] args)

Static Public Attributes

final String TIME_FORMAT = "yyyy'-'MM'-'dd'T'HH':'mm':'ss"

Private Member Functions

void parseCommandLine (String[] params) throws IllegalStateException
boolean checkState ()
Date getDate (String date) throws ParseException
void extractLogs ()
void splitFile ()

Static Private Member Functions

void usage (String prgName)

Private Attributes

char command
Date startDate = null endDate=null
String filterFileName = null
Integer num = null
Integer minutes = null
String sourceFileName = null
String destFileName = null
boolean outputAsCSV = false
String cols = null

Detailed Description

A coommand line tool to perform some helpful operation with the files of logs

Author:
acaproni


Constructor & Destructor Documentation

alma::acs::logging::tools::LogAssistant::LogAssistant String[]  args  )  [inline]
 

Constructor

Parameters:
args The command line params


Member Function Documentation

boolean alma::acs::logging::tools::LogAssistant::checkState  )  [inline, private]
 

Check the state of the variables. This method checks if the interal variables are set in the right way It is usually executed before running a command

Returns:
If the state is correct

void alma::acs::logging::tools::LogAssistant::extractLogs  )  [inline, private]
 

Extract the logs from the source to the destination file

Date alma::acs::logging::tools::LogAssistant::getDate String  date  )  throws ParseException [inline, private]
 

Parse the given string into a Date

Parameters:
date The string representing the date
Returns:
A Date obtained parsing the string
Exceptions:
ParseException If an error happen getting the date from the string

void alma::acs::logging::tools::LogAssistant::main String[]  args  )  [inline, static]
 

Parameters:
args 

void alma::acs::logging::tools::LogAssistant::parseCommandLine String[]  params  )  throws IllegalStateException [inline, private]
 

Parse the command line and fill the internal variables Throws an IllegalStateException if an error arises while parsing like for example invalid parameters.

Parameters:
params The parameters in the command line
Exceptions:
IllegalStateException If the parameters in the command line are invalid

void alma::acs::logging::tools::LogAssistant::splitFile  )  [inline, private]
 

Split the input log file in several files

void alma::acs::logging::tools::LogAssistant::usage String  prgName  )  [inline, static, private]
 

Print a usage message on screen

Parameters:
prgName The program name


Member Data Documentation

String alma::acs::logging::tools::LogAssistant::cols = null [private]
 

char alma::acs::logging::tools::LogAssistant::command [private]
 

String alma::acs::logging::tools::LogAssistant::destFileName = null [private]
 

String alma::acs::logging::tools::LogAssistant::filterFileName = null [private]
 

Integer alma::acs::logging::tools::LogAssistant::minutes = null [private]
 

Integer alma::acs::logging::tools::LogAssistant::num = null [private]
 

boolean alma::acs::logging::tools::LogAssistant::outputAsCSV = false [private]
 

String alma::acs::logging::tools::LogAssistant::sourceFileName = null [private]
 

Date alma::acs::logging::tools::LogAssistant::startDate = null endDate=null [private]
 

final String alma::acs::logging::tools::LogAssistant::TIME_FORMAT = "yyyy'-'MM'-'dd'T'HH':'mm':'ss" [static]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:53:59 2009 for ACS Java API by doxygen 1.3.8