Top Description Fields Methods
org.osgi.service.log

public Interface LogService

extends LoggerFactory
Annotations
@ProviderType
Imports
org.osgi.annotation.versioning.ProviderType, org.osgi.framework.ServiceReference

LogService for logging information.

Replaced by LoggerFactory.

Author
$Id: b5b08d7a0731d2bb2fabca84957e7a75e56e5079 $

Field Summary

Modifier and TypeField and Description
public static final int
LOG_DEBUG

Deprecated Since 1.4. Replaced by LogLevel#DEBUG.
A debugging message (Value 4).
public static final int
LOG_ERROR

Deprecated Since 1.4. Replaced by LogLevel#ERROR.
An error message (Value 1).
public static final int
LOG_INFO

Deprecated Since 1.4. Replaced by LogLevel#INFO.
An informational message (Value 3).
public static final int
LOG_WARNING

Deprecated Since 1.4. Replaced by LogLevel#WARN.
A warning message (Value 2).

Method Summary

Modifier and TypeMethod and Description
public void
log(int
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.
level
,
String
Human readable string describing the condition or null.
message
)
Deprecated Since 1.4. Replaced by Logger. See LoggerFactory.

Logs a message.

public void
log(int
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.
level
,
String
The human readable string describing the condition or null.
message
,
Throwable
The exception that reflects the condition or null.
exception
)
Deprecated Since 1.4. Replaced by Logger. See LoggerFactory.

Logs a message with an exception.

public void
log(ServiceReference<?>
The ServiceReference object of the service that this message is associated with or null.
sr
,
int
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.
level
,
String
Human readable string describing the condition or null.
message
)
Deprecated Since 1.4. Replaced by Logger. See LoggerFactory.

Logs a message associated with a specific ServiceReference object.

public void
log(ServiceReference<?>
The ServiceReference object of the service that this message is associated with.
sr
,
int
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.
level
,
String
Human readable string describing the condition or null.
message
,
Throwable
The exception that reflects the condition or null.
exception
)
Deprecated Since 1.4. Replaced by Logger. See LoggerFactory.

Logs a message with an exception associated and a ServiceReference object.

Inherited from org.osgi.service.log.LoggerFactory:
getLoggergetLoggergetLoggergetLoggergetLogger

Field Detail

LOG_DEBUGback to summary
public static final int LOG_DEBUG

Deprecated

Since 1.4. Replaced by LogLevel#DEBUG.

A debugging message (Value 4).

This log entry is used for problem determination and may be irrelevant to anyone but the bundle developer.

Annotations
@Deprecated
LOG_ERRORback to summary
public static final int LOG_ERROR

Deprecated

Since 1.4. Replaced by LogLevel#ERROR.

An error message (Value 1).

This log entry indicates the bundle or service may not be functional.

Annotations
@Deprecated
LOG_INFOback to summary
public static final int LOG_INFO

Deprecated

Since 1.4. Replaced by LogLevel#INFO.

An informational message (Value 3).

This log entry may be the result of any change in the bundle or service and does not indicate a problem.

Annotations
@Deprecated
LOG_WARNINGback to summary
public static final int LOG_WARNING

Deprecated

Since 1.4. Replaced by LogLevel#WARN.

A warning message (Value 2).

This log entry indicates a bundle or service is still functioning but may experience problems in the future because of the warning condition.

Annotations
@Deprecated

Method Detail

logback to summary
public void log(int level, String message)

Deprecated

Since 1.4. Replaced by Logger. See LoggerFactory.

Logs a message.

The ServiceReference field and the Throwable field of the LogEntry object will be set to null.

This method will log to the bundle's Logger named "LogService.<bsn>" where <bsn> is the Bundle Symbolic Name of the bundle.

The specified level is mapped to a LogLevel as follows:

In the generated log entry, LogEntry#getLevel() must return the specified level.
Parameters
level:int

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:String

Human readable string describing the condition or null.

Annotations
@Deprecated
logback to summary
public void log(int level, String message, Throwable exception)

Deprecated

Since 1.4. Replaced by Logger. See LoggerFactory.

Logs a message with an exception.

The ServiceReference field of the LogEntry object will be set to null.

This method will log to the bundle's Logger named "LogService.<bsn>" where <bsn> is the Bundle Symbolic Name of the bundle.

The specified level is mapped to a LogLevel as follows:

In the generated log entry, LogEntry#getLevel() must return the specified level.
Parameters
level:int

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:String

The human readable string describing the condition or null.

exception:Throwable

The exception that reflects the condition or null.

Annotations
@Deprecated
logback to summary
public void log(ServiceReference<?> sr, int level, String message)

Deprecated

Since 1.4. Replaced by Logger. See LoggerFactory.

Logs a message associated with a specific ServiceReference object.

The Throwable field of the LogEntry will be set to null.

This method will log to the bundle's Logger named "LogService.<bsn>" where <bsn> is the Bundle Symbolic Name of the bundle.

The specified level is mapped to a LogLevel as follows:

In the generated log entry, LogEntry#getLevel() must return the specified level.
Parameters
sr:ServiceReference<?>

The ServiceReference object of the service that this message is associated with or null.

level:int

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:String

Human readable string describing the condition or null.

Annotations
@Deprecated
logback to summary
public void log(ServiceReference<?> sr, int level, String message, Throwable exception)

Deprecated

Since 1.4. Replaced by Logger. See LoggerFactory.

Logs a message with an exception associated and a ServiceReference object.

This method will log to the bundle's Logger named "LogService.<bsn>" where <bsn> is the Bundle Symbolic Name of the bundle.

The specified level is mapped to a LogLevel as follows:

In the generated log entry, LogEntry#getLevel() must return the specified level.
Parameters
sr:ServiceReference<?>

The ServiceReference object of the service that this message is associated with.

level:int

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:String

Human readable string describing the condition or null.

exception:Throwable

The exception that reflects the condition or null.

Annotations
@Deprecated