|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.sap.tc.logging.ExceptionHandling
|
+--com.sap.tc.logging.Log
Writes log records to destinations. Writing log records is done on behalf of log controllers. On logging calls, records are written to the destination associated with the log in the format dictated by the formatter registered with the log, if the severity and the filters set for the log do not veto.
Please find fundamental information about the principles of error handling
in the package description. For this class, there are two cases where the
methods ExceptionHandling.getException() and ExceptionHandling.throwException() are served.
First, methods dealing with severities pass over a
java.lang.IllegalArgumentException if a value is out of range.
Second, output methods encountering problems leave the corresponding
java.io.IOException. Some of these problems are also logged
to the category /System/Logging which in turn writes messages
to the console.
LogController,
Severity,
Filter,
Formatter,
LogRecord| Field Summary | |
static int |
LOG_ACCESSABILITY_TYPE_LOCAL_LOG
Inheritance is allowed, but with additional condition: final discretion of message printing lies with the original parent object. |
static int |
LOG_ACCESSABILITY_TYPE_NORMAL_LOG
This type of Log allows regular inheritance; this log will become available to all descendants of the parent object. |
static int |
LOG_ACCESSABILITY_TYPE_PRIVATE_LOG
This type of Log completely disables inheritance. |
static int |
STATUS_CLOSED
|
static int |
STATUS_INVALID
|
static int |
STATUS_OPENED
|
| Method Summary | |
void |
addFilter(Filter filter)
Adds another filter that controls writing of messages via this log. |
boolean |
beGroup()
Deprecated. Not supported anymore. Always return False! |
boolean |
beLogged(int severity)
Checks whether a message with the specified severity would be written via this log. |
void |
close()
Closes output of this log object. |
void |
flush()
Flushes buffered records in this log object. |
java.lang.String |
getDescription()
Gets the description for this log. |
int |
getEffectiveSeverity()
Gets the current effective severity of this log. |
abstract java.lang.String |
getEncoding()
Gets the canonical name of the character encoding that is used for this log. |
java.util.Collection |
getFilters()
Gets the filters that control writing of messages via this log. |
java.lang.String |
getFooter()
Sets the footer text of this log. |
Formatter |
getFormatter()
Gets the formatter that dictates the format of log records in this log. |
java.lang.String |
getHeader()
Gets the header text of this log. |
int |
getLoggedCount()
|
java.lang.String |
getLogName()
Deprecated. @see {#getName()}. |
int |
getLogTypeAccessibility()
Gets the current accessibility type of this log. |
java.lang.String |
getName()
Gets the name for this log. |
int |
getNumberOfLogRecordsWritten()
This method returns the number that indicates how many LogRecords have been written so far. |
java.util.List |
getOwners()
|
LogRecord |
getRecord()
Deprecated. - Not supported anymore - always return null |
java.lang.String |
getVerInUse()
Gets the version of API. |
boolean |
isAutoFlush()
Checks whether this log flushes its output stream after each log message. |
boolean |
isClosed()
Check is this log closed. |
boolean |
isFiltersAgreeing(LogRecord rec)
Checks whether all filters associated with this log controller agree with writing a log record. |
boolean |
isOpened()
Check is this log opened. |
boolean |
isSuppressing()
|
void |
open()
open output of this log object. |
void |
removeFilter(Filter filter)
Removes a filter so that it no longer controls writing of messages via this log. |
void |
removeFilters()
Removes all filters associated with this log. |
void |
reset()
Reset all current Log settings and starts from beginning Current file |
void |
resetLoggedCount()
|
void |
setAutoFlush(boolean autoFlush)
Configures this log to flush the output stream after each log message. |
void |
setDescription(java.lang.String value)
Sets a description for this log. |
void |
setEffectiveSeverity(int severity)
Sets the effective severity of this log. |
abstract void |
setEncoding(java.lang.String enc)
Sets the named character encoding to be used for this log. |
void |
setFormatter(Formatter formatter)
Sets the formatter that dictates the format of log records in this log. |
void |
setLogName(java.lang.String name)
Deprecated. @see {#setName(String name)}. |
void |
setLogTypeAccessibility(int value)
Sets the accessibility level for this log. |
void |
setName(java.lang.String name)
Sets a name for this log. |
void |
setSuppressing(boolean suppressing)
|
long |
size()
Current size of the log. |
int |
status()
Status of this log object. |
LogRecord |
write(LogRecord rec)
Deprecated. not supported anymore |
| Methods inherited from class com.sap.tc.logging.ExceptionHandling |
getException, getExceptions, handleException, handleException, resetException, throwException |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int STATUS_INVALID
public static final int STATUS_CLOSED
public static final int STATUS_OPENED
public static final int LOG_ACCESSABILITY_TYPE_NORMAL_LOG
public static final int LOG_ACCESSABILITY_TYPE_LOCAL_LOG
public static final int LOG_ACCESSABILITY_TYPE_PRIVATE_LOG
| Method Detail |
public java.lang.String getName()
getName in interface IObjectInfopublic void setName(java.lang.String name)
public java.lang.String getDescription()
getDescription in interface IObjectInfopublic void setDescription(java.lang.String value)
public java.lang.String getVerInUse()
getVerInUse in interface IObjectInfopublic int status()
status in interface ILogpublic java.lang.String getHeader()
getHeader in interface ILog#setHeader(java.lang.String)public java.lang.String getFooter()
getFooter in interface ILog#setHeader(java.lang.String)public int getEffectiveSeverity()
getEffectiveSeverity in interface ILogpublic void setEffectiveSeverity(int severity)
setEffectiveSeverity in interface ILogseverity - New effective severitypublic int getLogTypeAccessibility()
getLogTypeAccessibility in interface ILogLOG_ACCESSABILITY_TYPE_NORMAL_LOG
LOG_ACCESSABILITY_TYPE_LOCAL_LOG
LOG_ACCESSABILITY_TYPE_PRIVATE_LOG.public void setLogTypeAccessibility(int value)
setLogTypeAccessibility in interface ILognew - accessibility type
LOG_ACCESSABILITY_TYPE_NORMAL_LOG
LOG_ACCESSABILITY_TYPE_LOCAL_LOG
LOG_ACCESSABILITY_TYPE_PRIVATE_LOG.public Formatter getFormatter()
getFormatter in interface ILogsetFormatter(Formatter)public void setFormatter(Formatter formatter)
setFormatter in interface ILoggetFormatter()public int getNumberOfLogRecordsWritten()
getNumberOfLogRecordsWritten in interface ILogpublic long size()
public abstract java.lang.String getEncoding()
getEncoding in interface ILogsetEncoding(java.lang.String)public abstract void setEncoding(java.lang.String enc)
setEncoding in interface ILogenc - Name of character encodinggetEncoding()public boolean isFiltersAgreeing(LogRecord rec)
rec - Log record to be writtenpublic java.util.Collection getFilters()
getFilters in interface ILogpublic void addFilter(Filter filter)
addFilter in interface ILogfilter - New filterpublic void removeFilter(Filter filter)
removeFilter in interface ILogfilter - Filter to be removedpublic void removeFilters()
removeFilters in interface ILogpublic boolean beLogged(int severity)
false the message is not going to be written
but not vice versa. To this end, the method checks whether the specified
severity is equal to or higher than the effective severity of the log. It
does not take into account filters associated with the log.beLogged in interface ILogseverity - Severity of message to be writtenpublic LogRecord write(LogRecord rec)
rec - Record to be writtenpublic void flush()
flush in interface ILogpublic boolean isAutoFlush()
isAutoFlush in interface ILogtrue if and only if this log flushes its output stream
after each log messagesetAutoFlush(boolean)public void setAutoFlush(boolean autoFlush)
setAutoFlush in interface ILogautoFlush - isAutoFlush()public void open()
open in interface ILogpublic void close()
close in interface ILogpublic boolean isClosed()
isClosed in interface ILogpublic boolean isOpened()
isOpened in interface ILogpublic void reset()
public boolean isSuppressing()
public void setSuppressing(boolean suppressing)
public int getLoggedCount()
public void resetLoggedCount()
public java.util.List getOwners()
public LogRecord getRecord()
public boolean beGroup()
#LogController.beGroup()public java.lang.String getLogName()
public void setLogName(java.lang.String name)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||