|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.equinox.log.internal.ExtendedLogServiceImpl
public class ExtendedLogServiceImpl
| Field Summary |
|---|
| Fields inherited from interface org.osgi.service.log.LogService |
|---|
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING |
| Constructor Summary | |
|---|---|
ExtendedLogServiceImpl(ExtendedLogServiceFactory factory,
Bundle bundle)
|
|
| Method Summary | |
|---|---|
Logger |
getLogger(Bundle logBundle,
String name)
Returns the logger associated with this logger name and bundle. |
Logger |
getLogger(String name)
Returns the Logger |
String |
getName()
Returns the name associated with this Logger
object. |
boolean |
isLoggable(int level)
Pre-checks if there are LogListeners who are listening for a matching log entry from this Logger. |
void |
log(int level,
String message)
Logs a message. |
void |
log(int level,
String message,
Throwable exception)
Logs a message with an exception. |
void |
log(Object context,
int level,
String message)
Extends the LogService
Logs a message with a context object |
void |
log(Object context,
int level,
String message,
Throwable exception)
Logs a message with an exception associated and a context object. |
void |
log(ServiceReference sr,
int level,
String message)
Logs a message associated with a specific ServiceReference
object. |
void |
log(ServiceReference sr,
int level,
String message,
Throwable exception)
Logs a message with an exception associated and a ServiceReference object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExtendedLogServiceImpl(ExtendedLogServiceFactory factory,
Bundle bundle)
| Method Detail |
|---|
public void log(int level,
String message)
LogService
The ServiceReference field and the Throwable field
of the LogEntry object will be set to null.
log in interface Loggerlog in interface LogServicelevel - 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.LogService.LOG_ERROR,
LogService.LOG_WARNING,
LogService.LOG_INFO,
LogService.LOG_DEBUG
public void log(int level,
String message,
Throwable exception)
LogService
The ServiceReference field of the LogEntry object
will be set to null.
log in interface Loggerlog in interface LogServicelevel - 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.LogService.LOG_ERROR,
LogService.LOG_WARNING,
LogService.LOG_INFO,
LogService.LOG_DEBUG
public void log(ServiceReference sr,
int level,
String message)
LogServiceServiceReference
object.
The Throwable field of the LogEntry will be set to
null.
log in interface Loggerlog in interface LogServicesr - The ServiceReference object of the service that this
message is associated with or null.level - 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.LogService.LOG_ERROR,
LogService.LOG_WARNING,
LogService.LOG_INFO,
LogService.LOG_DEBUG
public void log(ServiceReference sr,
int level,
String message,
Throwable exception)
LogServiceServiceReference object.
log in interface Loggerlog in interface LogServicesr - The ServiceReference object of the service that this
message is associated with.level - 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.exception - The exception that reflects the condition or
null.LogService.LOG_ERROR,
LogService.LOG_WARNING,
LogService.LOG_INFO,
LogService.LOG_DEBUG
public void log(Object context,
int level,
String message)
LoggerLogService
Logs a message with a context object
log in interface Loggercontext - The context object this message is associated with.level - The log level or severity of the message.message - A human readable string to associate with log entry.LogService.log(int, String)
public void log(Object context,
int level,
String message,
Throwable exception)
Logger
log in interface Loggercontext - The context object this message is associated with.level - The log level or severity of the message.message - A human readable string to associate with log entry.exception - The exception associated with this entryLogService.log(int, String, Throwable)public Logger getLogger(String name)
ExtendedLogServiceLogger object associated with this logger name for the bundle that retrieved this log service.
If loggerName is null the default Logger for this bundle is returned.
- Specified by:
getLogger in interface ExtendedLogService
- Parameters:
name - The logger name.
- Returns:
Logger associated with the logger name.
public Logger getLogger(Bundle logBundle,
String name)
ExtendedLogService
getLogger in interface ExtendedLogServicelogBundle - The bundles associated with this logger. If null the bundle that retrieved this log service is used.name - The logger name.
Logger associated with the logger name.public String getName()
LoggerLogger
object.
getName in interface LoggerString containing the name associated with this
Logger object;null if no name is
associated.public boolean isLoggable(int level)
LoggerLogger.
isLoggable in interface Loggerlevel - The log level or severity of the message.
boolean True if there a LogListener listening that can handle a log entry for this log level; false otherwise.ExtendedLogReaderService.addLogListener(org.osgi.service.log.LogListener, LogFilter),
LogFilter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||