Package org.eclipse.osgi.framework.log
Class FrameworkLogEntry
java.lang.Object
org.eclipse.osgi.framework.log.FrameworkLogEntry
A framework log entry used to log information to a FrameworkLog
- Since:
- 3.1
- Restriction:
- This class is not intended to be subclassed by clients.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Status type severity (bit mask, value 8) indicating this log entry represents a cancellation.static final int
Severity constant (bit mask, value 4) indicating this log entry represents an error.static final int
Severity constant (bit mask, value 1) indicating this log entry is informational only.static final int
Severity constant (value 0) indicating this log entry represents the nominal case.static final int
Severity constant (bit mask, value 2) indicating this log entry represents a warning. -
Constructor Summary
ConstructorDescriptionFrameworkLogEntry
(Object context, String entry, int severity, int bundleCode, String message, int stackCode, Throwable throwable, FrameworkLogEntry[] children) Constructs a new FrameworkLogEntryFrameworkLogEntry
(String entry, int severity, int bundleCode, String message, int stackCode, Throwable throwable, FrameworkLogEntry[] children) Constructs a new FrameworkLogEntryFrameworkLogEntry
(String entry, String message, int stackCode, Throwable throwable, FrameworkLogEntry[] children) Constructs a new FrameworkLogEntry -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the bundle-specific code describing the outcome.Returns the context associated with thisFrameworkLogEntry
object.getEntry()
int
Returns the severity.int
-
Field Details
-
OK
public static final int OKSeverity constant (value 0) indicating this log entry represents the nominal case.- Since:
- 3.2
- See Also:
-
INFO
public static final int INFOSeverity constant (bit mask, value 1) indicating this log entry is informational only.- Since:
- 3.2
- See Also:
-
WARNING
public static final int WARNINGSeverity constant (bit mask, value 2) indicating this log entry represents a warning.- Since:
- 3.2
- See Also:
-
ERROR
public static final int ERRORSeverity constant (bit mask, value 4) indicating this log entry represents an error.- Since:
- 3.2
- See Also:
-
CANCEL
public static final int CANCELStatus type severity (bit mask, value 8) indicating this log entry represents a cancellation.- Since:
- 3.2
- See Also:
-
-
Constructor Details
-
FrameworkLogEntry
public FrameworkLogEntry(String entry, String message, int stackCode, Throwable throwable, FrameworkLogEntry[] children) Constructs a new FrameworkLogEntry- Parameters:
entry
- the entrymessage
- the messagestackCode
- the stack codethrowable
- the throwablechildren
- the children
-
FrameworkLogEntry
public FrameworkLogEntry(String entry, int severity, int bundleCode, String message, int stackCode, Throwable throwable, FrameworkLogEntry[] children) Constructs a new FrameworkLogEntry- Parameters:
entry
- the entryseverity
- the severitybundleCode
- the bundle codemessage
- the messagestackCode
- the stack codethrowable
- the throwablechildren
- the children- Since:
- 3.2
-
FrameworkLogEntry
public FrameworkLogEntry(Object context, String entry, int severity, int bundleCode, String message, int stackCode, Throwable throwable, FrameworkLogEntry[] children) Constructs a new FrameworkLogEntry- Parameters:
context
- the contextentry
- the entryseverity
- the severitybundleCode
- the bundle codemessage
- the messagestackCode
- the stack codethrowable
- the throwablechildren
- the children- Since:
- 3.7
-
-
Method Details
-
getChildren
- Returns:
- Returns the children.
-
getEntry
- Returns:
- Returns the entry.
-
getMessage
- Returns:
- Returns the message.
-
getStackCode
public int getStackCode()- Returns:
- Returns the stackCode.
-
getThrowable
- Returns:
- Returns the throwable.
-
getSeverity
public int getSeverity()Returns the severity. The severities are as follows (in descending order):CANCEL
- cancelation occurredERROR
- a serious error (most severe)WARNING
- a warning (less severe)INFO
- an informational ("fyi") message (least severe)OK
- everything is just fine
The severity of a multi-entry log is defined to be the maximum severity of any of its children, or
OK
if it has no children.- Returns:
- the severity: one of
OK
,ERROR
,INFO
,WARNING
, orCANCEL
- Since:
- 3.2
-
getBundleCode
public int getBundleCode()Returns the bundle-specific code describing the outcome.- Returns:
- bundle-specific code
- Since:
- 3.2
-
getContext
Returns the context associated with thisFrameworkLogEntry
object.- Returns:
Object
containing the context associated with thisFrameworkLogEntry
object;null
if no context is associated with thisFrameworkLogEntry
object.- Since:
- 3.7
-