com.ibm.dtfj.analyzer.ext
Interface IMessageLogger

All Known Subinterfaces:
IAnalyzerContext

public interface IMessageLogger

Interface for classes keeping their own log of messages


Nested Class Summary
static class IMessageLogger.LocalLevel
          A level for use in the logMessage() method
 
Field Summary
static java.util.logging.Level LEVEL_DBDA_DUMP_MAJOR
          Level for the logMessage() method: used to report an error in the dump preventing analyzer to produce a reliable report
static java.util.logging.Level LEVEL_DBDA_DUMP_MINOR
          Level for the logMessage() methods: for observation regarding non-crucial information missing from the dump.
static java.util.logging.Level LEVEL_DBDA_DUMP_MINOR_FULL
          Level for the logMessage() methods: for full observation regarding non-crucial information missing from the dump.
static java.util.logging.Level LEVEL_DBDA_INFO
          Level for the logMessage() methods: for observations regarding anaylyer's work.
static java.util.logging.Level LEVEL_DBDA_OBSERVATION_HIGH
          Level for the logMessage() method: a CPR item that is moderately likely to a real problem
static java.util.logging.Level LEVEL_DBDA_OBSERVATION_LOW
          Level for the logMessage() method: a CPR item that is relatively unlikely to a real problem
static java.util.logging.Level LEVEL_DBDA_OBSERVATION_MEDIUM
          Level for the logMessage() method: a CPR item that is moderately likely to a real problem
static java.util.logging.Level LEVEL_DBDA_TOOL_MAJOR
          Level for the logMessage() method: used to report an internal error in the analyzer work preventing it to continue
static java.util.logging.Level LEVEL_DBDA_TOOL_MINOR
          Level for the logMessage() method: used to report an internal problem in the analyzer work which does not prevent it to continue
static java.util.logging.Level LEVEL_DBDA_TOOL_MINOR_FULL
          Level for the logMessage() method: used to report an internal problem in the analyzer work which does not prevent it to continue
 
Method Summary
 java.lang.String[] getMessages()
          Return logged important messages (level LEVEL_DBDA_DUMP_MAJOR and up)
 java.lang.String[] getMessages(java.util.logging.Level minLevel)
          Return logged messages according to the specified level.
 java.lang.String[] getMessages(java.util.logging.Level minLevel, java.util.logging.Level maxLevel)
          Return logged messages according to the specified level range.
 java.lang.String getResourceBundleName()
          Return the name of the resource used for message translation.
 void logMessage(java.util.logging.Level level, java.lang.String msg, java.lang.Object[] params, IAnalysisReport report)
          Add a message to the log.
 void logMessage(java.util.logging.Level level, java.lang.String msg, java.lang.Throwable exc, IAnalysisReport report)
          Add a message to the log.
 void logTranslatedMessage(java.util.logging.Level level, java.lang.String msg, java.lang.Object[] params, IAnalysisReport report)
          Add an already translated message to the log.
 void logTranslatedMessage(java.util.logging.Level level, java.lang.String msg, java.lang.Throwable exc, IAnalysisReport report)
          Add an already translated message to the log.
 boolean printReportStatistics(IAnalysisReport report)
          Report all the counters for the various types of errors encountered during generation of this report and other statistics.
 

Field Detail

LEVEL_DBDA_DUMP_MINOR_FULL

static final java.util.logging.Level LEVEL_DBDA_DUMP_MINOR_FULL
Level for the logMessage() methods: for full observation regarding non-crucial information missing from the dump. This level also includes stack trace or any other details not included with LEVEL_DBDA_DUMP_MINOR


LEVEL_DBDA_DUMP_MINOR

static final java.util.logging.Level LEVEL_DBDA_DUMP_MINOR
Level for the logMessage() methods: for observation regarding non-crucial information missing from the dump.


LEVEL_DBDA_INFO

static final java.util.logging.Level LEVEL_DBDA_INFO
Level for the logMessage() methods: for observations regarding anaylyer's work. Mostly for a quick debugging.


LEVEL_DBDA_OBSERVATION_LOW

static final java.util.logging.Level LEVEL_DBDA_OBSERVATION_LOW
Level for the logMessage() method: a CPR item that is relatively unlikely to a real problem


LEVEL_DBDA_OBSERVATION_MEDIUM

static final java.util.logging.Level LEVEL_DBDA_OBSERVATION_MEDIUM
Level for the logMessage() method: a CPR item that is moderately likely to a real problem


LEVEL_DBDA_OBSERVATION_HIGH

static final java.util.logging.Level LEVEL_DBDA_OBSERVATION_HIGH
Level for the logMessage() method: a CPR item that is moderately likely to a real problem


LEVEL_DBDA_DUMP_MAJOR

static final java.util.logging.Level LEVEL_DBDA_DUMP_MAJOR
Level for the logMessage() method: used to report an error in the dump preventing analyzer to produce a reliable report


LEVEL_DBDA_TOOL_MINOR_FULL

static final java.util.logging.Level LEVEL_DBDA_TOOL_MINOR_FULL
Level for the logMessage() method: used to report an internal problem in the analyzer work which does not prevent it to continue


LEVEL_DBDA_TOOL_MINOR

static final java.util.logging.Level LEVEL_DBDA_TOOL_MINOR
Level for the logMessage() method: used to report an internal problem in the analyzer work which does not prevent it to continue


LEVEL_DBDA_TOOL_MAJOR

static final java.util.logging.Level LEVEL_DBDA_TOOL_MAJOR
Level for the logMessage() method: used to report an internal error in the analyzer work preventing it to continue

Method Detail

logTranslatedMessage

void logTranslatedMessage(java.util.logging.Level level,
                          java.lang.String msg,
                          java.lang.Object[] params,
                          IAnalysisReport report)
Add an already translated message to the log.

Parameters:
level - the Level this message is logged in.
msg - the message to be appended to the log.
params - an array of parameter values to be used for position parameters of the message.
report - the IAnalyzerReport instance to print this message on. Could be null
See Also:
MessageFormat.format(Object[], StringBuffer, java.text.FieldPosition)

logTranslatedMessage

void logTranslatedMessage(java.util.logging.Level level,
                          java.lang.String msg,
                          java.lang.Throwable exc,
                          IAnalysisReport report)
Add an already translated message to the log. The exc's message is appended to the msg it is not a parameter in the message. Additionally, "interesting" exceptions are get counted and reported as an additional messages return by getMessages() method.

Parameters:
level - the Level this message is logged in.
msg - the message to be appended to the log.
exc - an exception
report - the IAnalyzerReport instance to print this message on. Could be null
See Also:
getMessages()

logMessage

void logMessage(java.util.logging.Level level,
                java.lang.String msg,
                java.lang.Object[] params,
                IAnalysisReport report)
Add a message to the log.

Parameters:
level - the Level this message is logged in.
msg - the message to be appended to the log.
params - an array of parameter values to be used for position parameters of the message.
report - the IAnalyzerReport instance to print this message on. Could be null
See Also:
MessageFormat.format(Object[], StringBuffer, java.text.FieldPosition)

logMessage

void logMessage(java.util.logging.Level level,
                java.lang.String msg,
                java.lang.Throwable exc,
                IAnalysisReport report)
Add a message to the log. The exc's message is appended to the msg it is not a parameter in the message. Additionally, "interesting" exceptions are get counted and reported as an additional messages return by getMessages() method.

Parameters:
level - the Level this message is logged in.
msg - the message to be appended to the log.
exc - an exception
report - the IAnalyzerReport instance to print this message on. Could be null
See Also:
getMessages()

getMessages

java.lang.String[] getMessages()
Return logged important messages (level LEVEL_DBDA_DUMP_MAJOR and up)

Returns:
String array of the logged messages. The return value is never null. If there is no message an empty array is return.

getMessages

java.lang.String[] getMessages(java.util.logging.Level minLevel)
Return logged messages according to the specified level.

Parameters:
minLevel - the threshold value
Returns:
String array of messages logged with level more or equal to minLevel

getMessages

java.lang.String[] getMessages(java.util.logging.Level minLevel,
                               java.util.logging.Level maxLevel)
Return logged messages according to the specified level range.

Parameters:
minLevel - the lower threshold value
maxLevel - the upper threshold value
Returns:
String array of messages logged with level more or equal to minLevel and less or equal to maxLevel

printReportStatistics

boolean printReportStatistics(IAnalysisReport report)
Report all the counters for the various types of errors encountered during generation of this report and other statistics. This error summary should normally be inserted as a sub-report and as the last entry in the report, to ensure that we get the complete statistics until the end.

Parameters:
report - a report to report statistics.
Returns:
true if something was reported in the statistics report.

getResourceBundleName

java.lang.String getResourceBundleName()
Return the name of the resource used for message translation.

Returns:
resource base name


© Copyright IBM Corp. 2007, 2008 All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.