|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Logger
The Logger
interface defines a simple API to enable some logging
in the XML Parser and ComponentMetadata handling classes and at the same
time not be too intrusive for the unit tests.
Method Summary | |
---|---|
boolean |
isLogEnabled(int level)
Returns true if logging for the given level is enabled. |
void |
log(int level,
String message,
ComponentMetadata metadata,
Throwable ex)
Writes a messages for the given ComponentMetadata . |
void |
log(int level,
String pattern,
Object[] arguments,
ComponentMetadata metadata,
Throwable ex)
Method to actually emit the log message. |
Method Detail |
---|
boolean isLogEnabled(int level)
true
if logging for the given level is enabled.
void log(int level, String pattern, Object[] arguments, ComponentMetadata metadata, Throwable ex)
level
- The log level to log the message atpattern
- The java.text.MessageFormat
message format
string for preparing the messagearguments
- The format arguments for the pattern
string.ex
- An optional Throwable
whose stack trace is written,
or null
to not log a stack trace.void log(int level, String message, ComponentMetadata metadata, Throwable ex)
ComponentMetadata
.
level
- The log level of the messages. This corresponds to the log
levels defined by the OSGi LogService.message
- The message to printmetadata
- The ComponentMetadata
whose processing caused
the message. This may be null
if the component
metadata is not known or applicable.ex
- The Throwable
causing the message to be logged.
This may be null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |