|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.ipojo.util.Logger
public class Logger
iPOJO Logger. This class is an helper class implementing a simple log system. This logger sends log messages to a log service if available.
Field Summary | |
---|---|
static int |
DEBUG
The Log Level DEBUG. |
static int |
ERROR
The Log Level ERROR. |
static int |
INFO
The Log Level INFO. |
static String |
IPOJO_LOG_LEVEL_HEADER
iPOJO log level manifest header. |
static String |
IPOJO_LOG_LEVEL_PROP
The iPOJO default log level property. |
static int |
WARNING
The Log Level WARNING. |
Constructor Summary | |
---|---|
Logger(BundleContext context,
ComponentInstance instance)
Create a logger. |
|
Logger(BundleContext context,
ComponentInstance instance,
int level)
Creates a logger. |
|
Logger(BundleContext context,
String name)
Create a logger. |
|
Logger(BundleContext context,
String name,
int level)
Creates a logger. |
Method Summary | |
---|---|
void |
log(int level,
String msg)
Logs a message. |
void |
log(int level,
String msg,
Throwable exception)
Logs a message with an exception. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String IPOJO_LOG_LEVEL_PROP
public static final String IPOJO_LOG_LEVEL_HEADER
public static final int ERROR
public static final int WARNING
public static final int INFO
public static final int DEBUG
Constructor Detail |
---|
public Logger(BundleContext context, String name, int level)
context
- the bundle contextname
- the name of the loggerlevel
- the trace levelpublic Logger(BundleContext context, ComponentInstance instance, int level)
context
- the bundle contextinstance
- the instancelevel
- the trace levelpublic Logger(BundleContext context, String name)
context
- the bundle contextname
- the name of the loggerpublic Logger(BundleContext context, ComponentInstance instance)
context
- the bundle contextinstance
- the instanceMethod Detail |
---|
public void log(int level, String msg)
level
- the level of the messagemsg
- the the message to logpublic void log(int level, String msg, Throwable exception)
level
- the level of the messagemsg
- the message to logexception
- the exception attached to the message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |