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.)
- Note
The registration of the
LogContextwith theOPALLoggerdoes not prevent the garbage collection of theLogContextunless 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 thefinalizemethod that references the context.
- Alphabetic
- By Inheritance
- LogContext
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
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(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )