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
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APP
The application prefix
|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public static final java.lang.String CLASS_VERSION
public static final java.lang.String FS
public static final java.lang.String APP
public static final java.lang.String CRITICAL_PREFIX
public static final java.lang.String MAJOR_PREFIX
public static final java.lang.String MINOR_PREFIX
public static java.lang.String formatCritical(java.lang.String pString)
pString
- String to formatpublic static java.lang.String formatMajor(java.lang.String pString)
pString
- String to formatpublic static java.lang.String formatMinor(java.lang.String pString)
pString
- String to format