trait LogContext extends AnyRef
A log context associates log messages with a specific context and logger.
Using a log context facilitates the suppression of recurring message in a specific context
and also makes it possible to direct messages to different targets.
Before using a LogContext
it has to be registered with the OPALLogger$.
OPAL uses two primary log contexts:
- The GlobalLogContext$ which should be used for general log messages related to OPAL, such as the number of threads used for computations.
- The log context associated with org.opalj.br.analyses.Projects to log project related information (e.g., such as project related results or configuration issues.)
- Source
- LogContext.scala
- Note
The registration of the
LogContext
with theOPALLogger
does not prevent the garbage collection of theLogContext
unless a logged message explicitly references its log context. This is – however – discouraged! If no message explicitly reference the log context it is then possible to unregister the log context in thefinalize
method that references the context.
- Alphabetic
- By Inheritance
- LogContext
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def newInstance: LogContext
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def incrementAndGetCount(message: LogMessage): Int
Increments the counter for the given message and returns the new value.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def logContextId: Int
The unique id associated with this log context.
The unique id associated with this log context. Each log context gets a unique id when it is registered with the OPALLogger. This id will not change afterwards.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def successor: LogContext
Creates a new log context that is the successor of this context and which will automatically be associated with the same logger as this
LogContext
. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated