object Logger
Singleton in control of what is supposed to get logged, how it's to be logged and where it is to be logged We uses a dynamic variable in case multiple threads are used as can be in scalatests
- Source
- Logger.scala
- Alphabetic
- By Inheritance
- Logger
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- class OutputCaptor extends AnyRef
a class for managing capturing logging output in a string buffer
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 clearStringBuffer(): Unit
Clears the logging data in the string capture buffer if it exists
Clears the logging data in the string capture buffer if it exists
- returns
The logging data if it exists
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getGlobalLevel: LogLevel.Value
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def makeScope[A](options: LoggerOptions)(codeBlock: => A): A
Set a scope for this logger based on available annotations
Set a scope for this logger based on available annotations
- A
return type of the code block
- options
LoggerOptions to use
- codeBlock
some Scala code over which to define this scope
- returns
the original return of the code block
- def makeScope[A](options: AnnotationSeq = Seq.empty)(codeBlock: => A): A
Set a scope for this logger based on available annotations
Set a scope for this logger based on available annotations
- A
return type of the code block
- options
a sequence annotations
- codeBlock
some Scala code over which to define this scope
- returns
the original return of the code block
- 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()
- def reset(): Unit
This resets everything in the current Logger environment, including the destination use this with caution.
This resets everything in the current Logger environment, including the destination use this with caution. Unexpected things can happen
- def setClassLogLevels(namesToLevel: Map[String, LogLevel.Value]): Unit
Adds a list of of className, loglevel tuples to the global (dynamicVar) See testPackageNameMatch for a description of how class name matching works
Adds a list of of className, loglevel tuples to the global (dynamicVar) See testPackageNameMatch for a description of how class name matching works
- namesToLevel
a list of tuples (class name, log level)
- def setConsole(): Unit
Sets the logging destination to Console.out
- def setLevel(classType: Class[_ <: LazyLogging], level: LogLevel.Value): Unit
Set the log level based on a class type
Set the log level based on a class type
- classType
Kind of class
- level
log level to set
setLevel(classOf[SomeClass], LogLevel.Debug)
Example: - def setLevel(classOrPackageName: String, level: LogLevel.Value): Unit
This sets the logging level for a particular class or package The package name must be general to specific.
This sets the logging level for a particular class or package The package name must be general to specific. I.e. package1.package2.class package1.package2 package1 Will work. package2.class will not work if package2 is within package1
- classOrPackageName
The string based class name or
- level
The desired global logging level
- def setLevel(level: LogLevel.Value): Unit
This sets the global logging level
This sets the global logging level
- level
The desired global logging level
- def setOptions(options: LoggerOptions): Unit
Set logger options
Set logger options
- options
options to set
- def setOptions(inputAnnotations: AnnotationSeq): Unit
Set logger options based on the content of an AnnotationSeq
Set logger options based on the content of an AnnotationSeq
- inputAnnotations
annotation sequence containing logger options
- def setOutput(stream: PrintStream): Unit
Set the logging destination to a print stream
Set the logging destination to a print stream
- stream
destination stream
- def setOutput(fileName: String): Unit
Set the logging destination to a file name
Set the logging destination to a file name
- fileName
destination name
- 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(classOf[java.lang.InterruptedException])
- 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]) @native()