atg.projects.store.logging
Class LogUtils

java.lang.Object
  extended by atg.projects.store.logging.LogUtils

public class LogUtils
extends java.lang.Object

This class provides static methods to format error messages to meet the error logging requirements. The logging requirements are as follows:

Each error message must be on a single line of wrapped text. The error messages will be formatted as follows:

Dynamo Criticality<FS>Date<FS>Time<fs>Store Prefix<fs>Store Criticality<fs>Error message

<fs> = field separator. Totality recommends using 4 spaces as a field separator. It's preferred to have a field separator between the date and time fields.

For example:
**** Error Sun Jun 24 2003 21:08:05 PDT BP Critical Process XYZ unable to connect to the database

The parsing will look for the critically, and then parse the message accordingly

Please use the following levels of critically:

This class contains static methods to convert strings to the desired criticality


Field Summary
static java.lang.String CLASS_VERSION
          Class version string.
static java.lang.String CRITICAL_PREFIX
          The critical prefix.
static java.lang.String FS
          The field separator.
static java.lang.String MAJOR_PREFIX
          The majore prefix.
static java.lang.String MINOR_PREFIX
          The minor prefix.
 
Method Summary
static java.lang.String formatCritical(java.lang.String pString)
          Formats a string by prefixing it with the critical error prefix.
static java.lang.String formatMajor(java.lang.String pString)
          Formats a string by prefixing it with the major error prefix.
static java.lang.String formatMinor(java.lang.String pString)
          Formats a string by prefixing it with the minor error prefix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string.


FS

public static final java.lang.String FS
The field separator.

See Also:
Constant Field Values

CRITICAL_PREFIX

public static final java.lang.String CRITICAL_PREFIX
The critical prefix.

See Also:
Constant Field Values

MAJOR_PREFIX

public static final java.lang.String MAJOR_PREFIX
The majore prefix.

See Also:
Constant Field Values

MINOR_PREFIX

public static final java.lang.String MINOR_PREFIX
The minor prefix.

See Also:
Constant Field Values
Method Detail

formatCritical

public static java.lang.String formatCritical(java.lang.String pString)
Formats a string by prefixing it with the critical error prefix.

Parameters:
pString - String to format
Returns:
formatted string

formatMajor

public static java.lang.String formatMajor(java.lang.String pString)
Formats a string by prefixing it with the major error prefix.

Parameters:
pString - String to format
Returns:
formatted string

formatMinor

public static java.lang.String formatMinor(java.lang.String pString)
Formats a string by prefixing it with the minor error prefix.

Parameters:
pString - String to format
Returns:
formatted string