|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.upnp.basedriver.tool.Logger
public class Logger
Field Summary | |
---|---|
static String |
END_ROW
|
static String |
NEWLINE
|
static String |
ROW
|
Constructor Summary | |
---|---|
Logger(String levelStr)
Create a Logger with System.out as PrintStream and without
reporting message on both PrintStream and LogService |
Method Summary | |
---|---|
void |
close()
Stop using the LogService and listening for those service event NOTE: All the message will be reported to PrintStream |
void |
DEBUG(String message)
|
void |
ERROR(String message)
|
boolean |
getCyberDebug()
|
int |
getLogLevel()
|
void |
INFO(String message)
|
void |
log(int msglevel,
String message)
Logs a message. |
void |
log(int msglevel,
String message,
Throwable exception)
Logs a message with an exception. |
void |
PACKET(String message)
|
void |
serviceChanged(ServiceEvent e)
Used to keep track the existence of a LogService |
void |
setCyberDebug(boolean value)
|
void |
setCyberDebug(String value)
|
void |
setLogLevel(int level)
|
void |
WARNING(String message)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NEWLINE
public static final String ROW
public static final String END_ROW
Constructor Detail |
---|
public Logger(String levelStr)
System.out
as PrintStream and without
reporting message on both PrintStream and LogService
log
- ServiceReference to the LogService to use,
or null to avoid the use of this service#Logger(LogService, PrintStream, boolean)
Method Detail |
---|
public void setCyberDebug(String value)
public void setLogLevel(int level)
public int getLogLevel()
public void setCyberDebug(boolean value)
public boolean getCyberDebug()
public final void ERROR(String message)
public final void WARNING(String message)
public final void INFO(String message)
public final void DEBUG(String message)
public final void PACKET(String message)
public void log(int msglevel, String message)
The ServiceReference field and the Throwable field of the LogEntry object will be set to null.
msglevel
- The severity of the message.
This should be one of the defined log levels
but may be any integer that is interpreted in a user defined way.message
- Human readable string describing the condition or null.#LOG_ERROR
,
#LOG_WARNING
,
#LOG_INFO
,
#LOG_DEBUG
public void log(int msglevel, String message, Throwable exception)
The ServiceReference field of the LogEntry object will be set to null.
msglevel
- The severity of the message.
This should be one of the defined log levels
but may be any integer that is interpreted in a user defined way.message
- The human readable string describing the condition or null.exception
- The exception that reflects the condition or null.#LOG_ERROR
,
#LOG_WARNING
,
#LOG_INFO
,
#LOG_DEBUG
public void serviceChanged(ServiceEvent e)
serviceChanged
in interface ServiceListener
ServiceListener.serviceChanged(org.osgi.framework.ServiceEvent)
public void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |