org.eclipse.equinox.log
Interface Logger

All Known Subinterfaces:
ExtendedLogService
All Known Implementing Classes:
ExtendedLogServiceImpl, LoggerImpl

public interface Logger

Provides named logger support for the OSGi LogService. Otherwise very similar to the LogService.

Since:
3.7
See Also:
LogService

Method Summary
 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)
           
 void log(int level, String message, Throwable 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)
           
 void log(ServiceReference<?> sr, int level, String message, Throwable exception)
           
 

Method Detail

log

void log(int level,
         String message)
See Also:
LogService.log(int, String)

log

void log(int level,
         String message,
         Throwable exception)
See Also:
LogService.log(int, String, Throwable)

log

void log(ServiceReference<?> sr,
         int level,
         String message)
See Also:
LogService.log(ServiceReference, int, String)

log

void log(ServiceReference<?> sr,
         int level,
         String message,
         Throwable exception)
See Also:
LogService.log(ServiceReference, int, String, Throwable)

log

void log(Object context,
         int level,
         String message)
Extends the LogService Logs a message with a context object

Parameters:
context - 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.
See Also:
LogService.log(int, String)

log

void log(Object context,
         int level,
         String message,
         Throwable exception)
Logs a message with an exception associated and a context object.

Parameters:
context - 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 entry
See Also:
LogService.log(int, String, Throwable)

isLoggable

boolean isLoggable(int level)
Pre-checks if there are LogListeners who are listening for a matching log entry from this Logger.

Parameters:
level - The log level or severity of the message.
Returns:
boolean True if there a LogListener listening that can handle a log entry for this log level; false otherwise.
See Also:
ExtendedLogReaderService.addLogListener(org.osgi.service.log.LogListener, LogFilter), LogFilter

getName

String getName()
Returns the name associated with this Logger object.

Returns:
String containing the name associated with this Logger object;null if no name is associated.


Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.