|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.etill.framework.log.ErrorLog
Provides the methods required to send messages to the Commerce Payments error log. Since ErrorLog only contains static methods and no instance variables, it is never instantiated.
All of the ErrorLog facilities are internationalized since message contents are read from a Properties file (through a ResourceBundle) which can be easily translated.
All the logging will be directed to the WebSphere Application Server activity.log file.
Methods are also provided to extract messages from the specified properties files into a String, rather than logging or displaying them. This can be useful for cassettes that want to put translated messages in places other than the log file.
The ErrorLog file (activity.log) grows arbitrarily large, so it needs to be manually pruned periodically.
Constructor Summary | |
---|---|
ErrorLog()
|
Method Summary | |
---|---|
static void |
createResourceBundle(String cassette)
The Framework calls this method to create a resource bundle for the specified cassette. |
static void |
log(String cassette,
String messageNumber)
Logs a message with no substitutions. |
static void |
log(String cassette,
String messageNumber,
Vector inserts)
Logs a message with the specified list of substitutions. |
static void |
logError(String cassette,
String messageNumber,
Throwable throwable)
Logs a message with no substitutions, followed by a Java stack trace from the specified exception object. |
static void |
logError(String cassette,
String messageNumber,
Throwable throwable,
Object[] parms)
Logs an error message with an array substitutions, followed optionally by a Java stack trace from the specified exception object. |
static void |
logError(String cassette,
String messageNumber,
Throwable throwable,
String subst1)
Logs a message with one substitution, followed by a Java stack trace from the specified exception object. |
static void |
logError(String cassette,
String messageNumber,
Throwable throwable,
String subst1,
String subst2)
Logs a message with two substitutions, followed by a Java stack trace from the specified exception object. |
static void |
logError(String cassette,
String messageNumber,
Throwable throwable,
String subst1,
String subst2,
String subst3)
Logs a message with three substitutions, followed by a Java stack trace from the specified exception object. |
static void |
logError(String cassette,
String messageNumber,
Throwable throwable,
String subst1,
String subst2,
String subst3,
String subst4)
Logs a message with four substitutions, followed by a Java stack trace from the specified exception object. |
static void |
logError(String cassette,
String messageNumber,
Throwable throwable,
String subst1,
String subst2,
String subst3,
String subst4,
String subst5)
Logs a message with five substitutions, followed by a Java stack trace from the specified exception object. |
static void |
logError(String cassette,
String messageNumber,
Throwable throwable,
Vector inserts)
Logs a message with a Vector of substitutions, followed optionally by a Java stack trace from the specified exception object. |
static void |
logErrorMessage(int cassette,
String messageNumber,
Vector inserts)
Deprecated. use logError methods instead |
static void |
logInfo(String cassette,
String messageNumber,
Object[] parms)
Logs an informational message with an array substitutions. |
static void |
logWarn(String cassette,
String messageNumber,
Object[] parms)
Logs a warning message with an array substitutions. |
static String |
lookupMessage(String cassette,
String messageNumber)
Returns the message, including the message identifier, without substitutions, as a String. |
static String |
lookupMessage(String cassette,
String messageNumber,
Object[] parms)
Returns the message, including the message identifier and substitutions, as a String. |
static String |
lookupMessage(String cassette,
String messageNumber,
Vector inserts)
Returns the message, including the message identifier and substitutions, as a String. |
static String |
lookupMessageText(String cassette,
String messageNumber)
Returns the message text (without the message identifier), without substitutions, as a String. |
static String |
lookupMessageText(String cassette,
String messageNumber,
Vector inserts)
Returns the message text (without the message identifier), including substitutions, as a String. |
static void |
printStackTrace(Throwable throwable)
Logs a Java stack trace from the specified exception object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ErrorLog()
Method Detail |
public static void createResourceBundle(String cassette)
cassette
- the name of the cassette.
This will also serve as the resource bundle identifier.public static final void log(String cassette, String messageNumber)
cassette
- the name of the cassette.
This also serves as the resource bundle identifier.messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.public static final void log(String cassette, String messageNumber, Vector inserts)
cassette
- the name of the cassette.
This also serves as the resource bundle identifier.messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.inserts
- a Vector of Strings containing the list of substitutions
in the order in which they will appear in the message.public static final void logError(String cassette, String messageNumber, Throwable throwable)
cassette
- the name of the cassette.
This also serves as the resource bundle identifier.messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.throwable
- a Throwable object whose Java stack trace will be logged
after the message.public static final void logError(String cassette, String messageNumber, Throwable throwable, String subst1)
cassette
- the name of the cassette.
This also serves as the resource bundle identifier.messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.throwable
- a Throwable object whose Java stack trace will be logged
after the message.subst1
- the substitution text.public static final void logError(String cassette, String messageNumber, Throwable throwable, String subst1, String subst2)
cassette
- the name of the cassette.
This also serves as the resource bundle identifier.messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.throwable
- a Throwable object whose Java stack trace will be logged
after the message.subst1
- the text of the first substitution.subst2
- the text of the second substitution.public static final void logError(String cassette, String messageNumber, Throwable throwable, String subst1, String subst2, String subst3)
cassette
- the name of the cassette.
This also serves as the resource bundle identifier.messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.throwable
- a Throwable object whose Java stack trace will be logged
after the message.subst1
- the text of the first substitution.subst2
- the text of the second substitution.subst3
- the text of the third substitution.public static void logError(String cassette, String messageNumber, Throwable throwable, String subst1, String subst2, String subst3, String subst4)
cassette
- the name of the cassette.
This also serves as the resource bundle identifier.messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.throwable
- a Throwable object whose Java stack trace will be logged
after the message.subst1
- the text of the first substitution.subst2
- the text of the second substitution.subst3
- the text of the third substitution.subst4
- the text of the fourth substitution.public static final void logError(String cassette, String messageNumber, Throwable throwable, String subst1, String subst2, String subst3, String subst4, String subst5)
cassette
- the name of the cassette.
This also serves as the resource bundle identifier.messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.throwable
- a Throwable object whose Java stack trace will be logged
after the message.subst1
- the text of the first substitution.subst2
- the text of the second substitution.subst3
- the text of the third substitution.subst4
- the text of the fourth substitution.subst5
- the text of the fifth substitution.public static final void logError(String cassette, String messageNumber, Throwable throwable, Vector inserts)
cassette
- the name of the cassette.
This also serves as the resource bundle identifier.messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.throwable
- a Throwable object whose Java stack trace will be logged
after the message.inserts
- a Vector of Strings containing the list of substitutions
in the order in which they will appear in the message.public static final void logError(String cassette, String messageNumber, Throwable throwable, Object[] parms)
cassette
- the name of the cassette.
This also serves as the resource bundle identifier.messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.throwable
- a Throwable object whose Java stack trace will be logged
after the message.parms
- an array of Strings containing the list of substitutions
in the order in which they will appear in the message.public static final void logWarn(String cassette, String messageNumber, Object[] parms)
cassette
- the name of the cassette.
This also serves as the resource bundle identifier.messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.throwable
- a Throwable object whose Java stack trace will be logged
after the message.parms
- an array of Strings containing the list of substitutions
in the order in which they will appear in the message.public static final void logInfo(String cassette, String messageNumber, Object[] parms)
cassette
- the name of the cassette.
This also serves as the resource bundle identifier.messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.throwable
- a Throwable object whose Java stack trace will be logged
after the message.parms
- an array of Strings containing the list of substitutions
in the order in which they will appear in the message.public static void printStackTrace(Throwable throwable)
throwable
- a Throwable object whose Java stack trace will be logged
after the message.public static void logErrorMessage(int cassette, String messageNumber, Vector inserts)
cassette
- an int that contains an index representing the
resourcebundle that contains the message. (This
index is only available within the Framework. Cassettes should
not attempt to call this method).messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.inserts
- a Vector of Strings containing the list of substitutions
in the order in which they will appear in the message.public static String lookupMessage(String cassette, String messageNumber)
cassette
- the name of the cassette.
This also serves as the resource bundle identifier.messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.public static String lookupMessage(String cassette, String messageNumber, Object[] parms)
cassette
- the name of the cassette.
This also serves as the resource bundle identifier.messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.parms
- an Array of Objects containing the list of substitutions
in the order in which they will appear in the message.public static String lookupMessage(String cassette, String messageNumber, Vector inserts)
cassette
- the name of the cassette.
This also serves as the resource bundle identifier.messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.inserts
- a Vector of Strings containint the list of substitutions
in the order in which they will appear in the message.public static String lookupMessageText(String cassette, String messageNumber)
cassette
- the name of the cassette.
This also serves as the resource bundle identifier.messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.public static String lookupMessageText(String cassette, String messageNumber, Vector inserts)
cassette
- the name of the cassette.
This also serves as the resource bundle identifier.messageNumber
- the 4 digit message number that identifies the
message to be recorded to the log.inserts
- a Vector of Strings containint the list of substitutions
in the order in which they will appear in the message.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |