object OPALLogger extends OPALLogger
OPAL's logging facility.
Usage
Basic
E.g., using the global context and the convenience methods.
implicit val logContext : LogContext = org.opalj.log.GlobalContext OPALLogger.info("project", "the project is garbage collected")
or
OPALLogger.info("project", "the project is garbage collected")(org.opalj.log.GlobalContext)
Advanced
Logging a message only once.
implicit val logContext : LogContext = org.opalj.log.GlobalContext OPALLogger.logOnce(Warn("project configuration", "the method cannot be resolved"))
Initialization
If the GlobalLogContext should not use the default ConsoleOPALLogger then the
logger can be changed using updateLogger
.
Thread Safety
Thread safe.
- Source
- OPALLogger.scala
- Alphabetic
- By Inheritance
- OPALLogger
- OPALLogger
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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 debug(p: => Boolean, category: String, message: => String)(implicit ctx: LogContext): Unit
Debug message are only included in the code if assertions are turned on and the predicate
p
evaluates totrue
.Debug message are only included in the code if assertions are turned on and the predicate
p
evaluates totrue
. If debug message are logged, then they are logged as Info-level messages.- Annotations
- @elidable()
- final def debug(category: String, message: String)(implicit ctx: LogContext): Unit
Debug message are only included in the code if assertions are turned on.
Debug message are only included in the code if assertions are turned on. If debug message are logged, then they are logged as Info-level messages.
- Annotations
- @elidable()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def error(category: String, message: String, t: Throwable)(implicit ctx: LogContext): Unit
Log an error message.
Log an error message. Error message should either be related to internal errors or to project configurations that are so badly broken that a meaningful analysis is not possible.
This method is primarily a convenience method that creates an Error message which is the logged.
- final def error(category: String, message: String)(implicit ctx: LogContext): Unit
Log an error message.
Log an error message. Error message should either be related to internal errors or to project configurations that are so badly broken that a meaningful analysis is not possible.
This method is primarily a convenience method that creates an Error message which is the logged.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def globalLogger(): OPALLogger
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def info(category: String, message: String)(implicit ctx: LogContext): Unit
Log some general information.
Log some general information. General information may be related, e.g., to the overall progress of the analysis, the results of an analysis, the major configuration settings.
This method is primarily a convenience method that creates an Info message which is the logged.
- Note
Do not use this method if the analysis may create the same message multiple times. In this case use logOnce.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isUnregistered(ctx: LogContext): Boolean
- def log(message: LogMessage)(implicit ctx: LogContext): Unit
The given message is logged.
The given message is logged.
- Definition Classes
- OPALLogger → OPALLogger
- final def logOnce(message: LogMessage)(implicit ctx: LogContext): Unit
The given message is only logged once.
The given message is only logged once. This is particularly useful if an analysis may hit a specific problem multiple times, but it is sufficient/meaningful to log it only once.
This method should not be used if the message may only be generated at most once. The respective message will be cached in the log context.
- Definition Classes
- OPALLogger
- def logger(ctx: LogContext): OPALLogger
- 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()
- final def progress(message: String)(implicit ctx: LogContext): Unit
Logs a message in the category "
progress
". - def register(ctx: LogContext, logger: OPALLogger = new ConsoleOPALLogger(true)): Unit
Registers the given context with the OPAL logging facility and associates the specified logger with the context.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unregister(ctx: LogContext): Unit
- def updateLogger(ctx: LogContext, logger: OPALLogger): Unit
- 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])
- final def warn(category: String, message: String)(implicit ctx: LogContext): Unit
Log a warning.
Log a warning. Warnings are typically related to incomplete project configurations that may affect the overall precision of the analysis, but which are not rendering the analysis meaningless.
This method is primarily a convenience method that creates an Warn message which is the logged.
- Note
Do not use this method if the analysis may create the same message multiple times. In this case use logOnce.
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated