Class FrameworkLogEntry


  • public class FrameworkLogEntry
    extends java.lang.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 int CANCEL
      Status type severity (bit mask, value 8) indicating this log entry represents a cancellation.
      static int ERROR
      Severity constant (bit mask, value 4) indicating this log entry represents an error.
      static int INFO
      Severity constant (bit mask, value 1) indicating this log entry is informational only.
      static int OK
      Severity constant (value 0) indicating this log entry represents the nominal case.
      static int WARNING
      Severity constant (bit mask, value 2) indicating this log entry represents a warning.
    • Constructor Summary

      Constructors 
      Constructor Description
      FrameworkLogEntry​(java.lang.Object context, java.lang.String entry, int severity, int bundleCode, java.lang.String message, int stackCode, java.lang.Throwable throwable, FrameworkLogEntry[] children)
      Constructs a new FrameworkLogEntry
      FrameworkLogEntry​(java.lang.String entry, int severity, int bundleCode, java.lang.String message, int stackCode, java.lang.Throwable throwable, FrameworkLogEntry[] children)
      Constructs a new FrameworkLogEntry
      FrameworkLogEntry​(java.lang.String entry, java.lang.String message, int stackCode, java.lang.Throwable throwable, FrameworkLogEntry[] children)
      Constructs a new FrameworkLogEntry
    • 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​(java.lang.String entry,
                                 java.lang.String message,
                                 int stackCode,
                                 java.lang.Throwable throwable,
                                 FrameworkLogEntry[] children)
        Constructs a new FrameworkLogEntry
        Parameters:
        entry - the entry
        message - the message
        stackCode - the stack code
        throwable - the throwable
        children - the children
      • FrameworkLogEntry

        public FrameworkLogEntry​(java.lang.String entry,
                                 int severity,
                                 int bundleCode,
                                 java.lang.String message,
                                 int stackCode,
                                 java.lang.Throwable throwable,
                                 FrameworkLogEntry[] children)
        Constructs a new FrameworkLogEntry
        Parameters:
        entry - the entry
        severity - the severity
        bundleCode - the bundle code
        message - the message
        stackCode - the stack code
        throwable - the throwable
        children - the children
        Since:
        3.2
      • FrameworkLogEntry

        public FrameworkLogEntry​(java.lang.Object context,
                                 java.lang.String entry,
                                 int severity,
                                 int bundleCode,
                                 java.lang.String message,
                                 int stackCode,
                                 java.lang.Throwable throwable,
                                 FrameworkLogEntry[] children)
        Constructs a new FrameworkLogEntry
        Parameters:
        context - the context
        entry - the entry
        severity - the severity
        bundleCode - the bundle code
        message - the message
        stackCode - the stack code
        throwable - the throwable
        children - the children
        Since:
        3.7
    • Method Detail

      • getChildren

        public FrameworkLogEntry[] getChildren()
        Returns:
        Returns the children.
      • getEntry

        public java.lang.String getEntry()
        Returns:
        Returns the entry.
      • getMessage

        public java.lang.String getMessage()
        Returns:
        Returns the message.
      • getStackCode

        public int getStackCode()
        Returns:
        Returns the stackCode.
      • getThrowable

        public java.lang.Throwable getThrowable()
        Returns:
        Returns the throwable.
      • getSeverity

        public int getSeverity()
        Returns the severity. The severities are as follows (in descending order):
        • CANCEL - cancelation occurred
        • ERROR - 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, or CANCEL
        Since:
        3.2
      • getBundleCode

        public int getBundleCode()
        Returns the bundle-specific code describing the outcome.
        Returns:
        bundle-specific code
        Since:
        3.2
      • getContext

        public java.lang.Object getContext()
        Returns the context associated with this FrameworkLogEntry object.
        Returns:
        Object containing the context associated with this FrameworkLogEntry object;null if no context is associated with this FrameworkLogEntry object.
        Since:
        3.7