com.sap.tc.logging.interfaces
Interface ILog
- All Superinterfaces:
- Cloneable, IObjectInfo
- All Known Subinterfaces:
- IFileLog, IReadableLog
- All Known Implementing Classes:
- FileLog, Log, ReadableLog
- public interface ILog
- extends IObjectInfo, Cloneable
|
Method Summary |
void |
addFilter(Filter filter)
Adds another filter that controls writing of messages via this log.
|
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. |
int |
getEffectiveSeverity()
Gets the current effective severity of this log. |
String |
getEncoding()
Gets the canonical name of the character encoding that is used for this
log.
|
Collection |
getFilters()
Gets the filters that control writing of messages via this log. |
String |
getFooter()
Sets the footer text of this log. |
Formatter |
getFormatter()
Gets the formatter that dictates the format of log records in this log. |
String |
getHeader()
Gets the header text of this log. |
int |
getLogTypeAccessibility()
Gets the current accessibility type of this log. |
int |
getNumberOfLogRecordsWritten()
This method returns the number that indicates
how many LogRecords have been written so far.
|
boolean |
isAutoFlush()
Checks whether this log flushes its output stream after each log message.
|
boolean |
isClosed()
Check is this log closed. |
boolean |
isOpened()
Check is this log opened. |
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 |
setAutoFlush(boolean autoFlush)
Configures this log to flush the output stream after each log message.
|
void |
setEffectiveSeverity(int severity)
Sets the effective severity of this log. |
void |
setEncoding(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 |
setLogTypeAccessibility(int value)
Sets the effective severity of this log. |
int |
status()
Status of this log object. |
getFormatter
public Formatter getFormatter()
- Gets the formatter that dictates the format of log records in this log.
- Returns:
- Formatter
- See Also:
setFormatter(Formatter)
setFormatter
public void setFormatter(Formatter formatter)
- Sets the formatter that dictates the format of log records in this log.
- Returns:
- Formatter
- See Also:
getFormatter()
setEffectiveSeverity
public void setEffectiveSeverity(int severity)
- Sets the effective severity of this log.
- Parameters:
severity - New effective severity
getEffectiveSeverity
public int getEffectiveSeverity()
- Gets the current effective severity of this log.
- Returns:
- Effective severity
getHeader
public String getHeader()
- Gets the header text of this log.
- Returns:
- Text which represent header of this log.
- See Also:
#setHeader(java.lang.String)
getFooter
public String getFooter()
- Sets the footer text of this log.
- Returns:
- Text which represent footer of this log.
- See Also:
#setHeader(java.lang.String)
getEncoding
public String getEncoding()
- Gets the canonical name of the character encoding that is used for this
log.
If no character encoding is set the default character encoding of the
platform is used.
- Returns:
- Name of character encoding
- See Also:
setEncoding(java.lang.String)
setEncoding
public void setEncoding(String enc)
- Sets the named character encoding to be used for this log.
If no character encoding is set the default character encoding is used.
- Parameters:
enc - Name of character encoding- See Also:
getEncoding()
getLogTypeAccessibility
public int getLogTypeAccessibility()
- Gets the current accessibility type of this log.
- Returns:
- Effective severity
setLogTypeAccessibility
public void setLogTypeAccessibility(int value)
- Sets the effective severity of this log.
getNumberOfLogRecordsWritten
public int getNumberOfLogRecordsWritten()
- This method returns the number that indicates
how many LogRecords have been written so far.
This does not take into account how many LogRecords were there in the file
before the current session has started.
Therefore, please note that this number deals with the number of LogRecords
that have been written in the current session.
- Returns:
- int Number of LogRecords written so far in the current session.
beLogged
public boolean beLogged(int severity)
- Checks whether a message with the specified severity would be written via
this log.
The purpose of this method is to avoid evaluating the arguments of a
logging call, which is expensive and would be superfluous if a message is
not written because of its insufficient severity. The result returned is
necessary but not sufficient for writing log messages, that is if the
method returns
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.
- Parameters:
severity - Severity of message to be written
getFilters
public Collection getFilters()
- Gets the filters that control writing of messages via this log.
- Returns:
- Unmodifiable collection of filters associated with this log
addFilter
public void addFilter(Filter filter)
- Adds another filter that controls writing of messages via this log.
The results of all filters for a given message are logically
anded to determine whether a message is to be written.
- Parameters:
filter - New filter
removeFilter
public void removeFilter(Filter filter)
- Removes a filter so that it no longer controls writing of messages via this
log.
- Parameters:
filter - Filter to be removed
removeFilters
public void removeFilters()
- Removes all filters associated with this log.
flush
public void flush()
- Flushes buffered records in this log object.
isAutoFlush
public boolean isAutoFlush()
- Checks whether this log flushes its output stream after each log message.
Automatic flushing is switched on in a new log.
- Returns:
true if and only if this log flushes its output stream
after each log message- See Also:
setAutoFlush(boolean)
setAutoFlush
public void setAutoFlush(boolean autoFlush)
- Configures this log to flush the output stream after each log message.
Automatic flushing is switched on in a new log.
- Parameters:
autoFlush - - See Also:
isAutoFlush()
close
public void close()
- Closes output of this log object.
isClosed
public boolean isClosed()
- Check is this log closed.
open
public void open()
- Open output of this log object.
isOpened
public boolean isOpened()
- Check is this log opened.
status
public int status()
- Status of this log object.
Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.