org.eclipse.equinox.log.internal
Class LoggerImpl

java.lang.Object
  extended by org.eclipse.equinox.log.internal.LoggerImpl
All Implemented Interfaces:
Logger

public class LoggerImpl
extends Object
implements Logger


Constructor Summary
LoggerImpl(ExtendedLogServiceImpl logServiceImpl, String name)
           
 
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggerImpl

public LoggerImpl(ExtendedLogServiceImpl logServiceImpl,
                  String name)
Method Detail

getName

public String getName()
Description copied from interface: Logger
Returns the name associated with this Logger object.

Specified by:
getName in interface Logger
Returns:
String containing the name associated with this Logger object;null if no name is associated.

isLoggable

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

Specified by:
isLoggable in interface 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

log

public void log(int level,
                String message)
Specified by:
log in interface Logger
See Also:
LogService.log(int, String)

log

public void log(int level,
                String message,
                Throwable exception)
Specified by:
log in interface Logger
See Also:
LogService.log(int, String, Throwable)

log

public void log(ServiceReference sr,
                int level,
                String message)
Specified by:
log in interface Logger
See Also:
LogService.log(ServiceReference, int, String)

log

public void log(ServiceReference sr,
                int level,
                String message,
                Throwable exception)
Specified by:
log in interface Logger
See Also:
LogService.log(ServiceReference, int, String, Throwable)

log

public void log(Object context,
                int level,
                String message)
Description copied from interface: Logger
Extends the LogService Logs a message with a context object

Specified by:
log in interface Logger
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

public void log(Object context,
                int level,
                String message,
                Throwable exception)
Description copied from interface: Logger
Logs a message with an exception associated and a context object.

Specified by:
log in interface Logger
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)


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