Package org.eclipse.osgi.framework.log
Class FrameworkLogEntry
- java.lang.Object
-
- org.eclipse.osgi.framework.log.FrameworkLogEntry
-
public class FrameworkLogEntry extends Object
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
Fields Modifier and Type Field Description static intCANCELStatus type severity (bit mask, value 8) indicating this log entry represents a cancellation.static intERRORSeverity constant (bit mask, value 4) indicating this log entry represents an error.static intINFOSeverity constant (bit mask, value 1) indicating this log entry is informational only.static intOKSeverity constant (value 0) indicating this log entry represents the nominal case.static intWARNINGSeverity constant (bit mask, value 2) indicating this log entry represents a warning.
-
Constructor Summary
Constructors Constructor Description FrameworkLogEntry(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBundleCode()Returns the bundle-specific code describing the outcome.FrameworkLogEntry[]getChildren()ObjectgetContext()Returns the context associated with thisFrameworkLogEntryobject.StringgetEntry()StringgetMessage()intgetSeverity()Returns the severity.intgetStackCode()ThrowablegetThrowable()
-
-
-
Field Detail
-
OK
public static final int OK
Severity constant (value 0) indicating this log entry represents the nominal case.- Since:
- 3.2
- See Also:
getSeverity(), Constant Field Values
-
INFO
public static final int INFO
Severity constant (bit mask, value 1) indicating this log entry is informational only.- Since:
- 3.2
- See Also:
getSeverity(), Constant Field Values
-
WARNING
public static final int WARNING
Severity constant (bit mask, value 2) indicating this log entry represents a warning.- Since:
- 3.2
- See Also:
getSeverity(), Constant Field Values
-
ERROR
public static final int ERROR
Severity constant (bit mask, value 4) indicating this log entry represents an error.- Since:
- 3.2
- See Also:
getSeverity(), Constant Field Values
-
CANCEL
public static final int CANCEL
Status type severity (bit mask, value 8) indicating this log entry represents a cancellation.- Since:
- 3.2
- See Also:
getSeverity(), Constant Field Values
-
-
Constructor Detail
-
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 Detail
-
getChildren
public FrameworkLogEntry[] getChildren()
- Returns:
- Returns the children.
-
getEntry
public String getEntry()
- Returns:
- Returns the entry.
-
getMessage
public String getMessage()
- Returns:
- Returns the message.
-
getStackCode
public int getStackCode()
- Returns:
- Returns the stackCode.
-
getThrowable
public Throwable 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
OKif 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
public Object getContext()
Returns the context associated with thisFrameworkLogEntryobject.- Returns:
Objectcontaining the context associated with thisFrameworkLogEntryobject;nullif no context is associated with thisFrameworkLogEntryobject.- Since:
- 3.7
-
-