Logger

logger.Logger
See theLogger companion class
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

Attributes

Companion
class
Deprecated
[Since version Chisel 7.0.0] All APIs in package firrtl are deprecated.
Source
Logger.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Logger.type

Members list

Type members

Classlikes

class OutputCaptor

a class for managing capturing logging output in a string buffer

a class for managing capturing logging output in a string buffer

Attributes

Source
Logger.scala
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

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

Attributes

Returns

The logging data if it exists

Source
Logger.scala

Attributes

Source
Logger.scala
def makeScope[A](options: AnnotationSeq = ...)(codeBlock: => A): A

Set a scope for this logger based on available annotations

Set a scope for this logger based on available annotations

Type parameters

A

return type of the code block

Value parameters

codeBlock

some Scala code over which to define this scope

options

a sequence annotations

Attributes

Returns

the original return of the code block

Source
Logger.scala
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

Type parameters

A

return type of the code block

Value parameters

codeBlock

some Scala code over which to define this scope

options

LoggerOptions to use

Attributes

Returns

the original return of the code block

Source
Logger.scala
def reset(): Unit

This resets everything in the current Logger environment, including the destination use this with caution. Unexpected things can happen

This resets everything in the current Logger environment, including the destination use this with caution. Unexpected things can happen

Attributes

Source
Logger.scala
def setClassLogLevels(namesToLevel: Map[String, 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

Value parameters

namesToLevel

a list of tuples (class name, log level)

Attributes

Source
Logger.scala
def setConsole(): Unit

Sets the logging destination to Console.out

Sets the logging destination to Console.out

Attributes

Source
Logger.scala
def setLevel(level: Value): Unit

This sets the global logging level

This sets the global logging level

Value parameters

level

The desired global logging level

Attributes

Source
Logger.scala
def setLevel(classOrPackageName: String, level: Value): Unit

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

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

Value parameters

classOrPackageName

The string based class name or

level

The desired global logging level

Attributes

Source
Logger.scala
def setLevel(classType: Class[_ <: LazyLogging], level: Value): Unit

Set the log level based on a class type

Set the log level based on a class type

Value parameters

classType

Kind of class

level

log level to set

Attributes

Example
 setLevel(classOf[SomeClass], LogLevel.Debug) 
Source
Logger.scala
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

Value parameters

inputAnnotations

annotation sequence containing logger options

Attributes

Source
Logger.scala
def setOptions(options: LoggerOptions): Unit

Set logger options

Set logger options

Value parameters

options

options to set

Attributes

Source
Logger.scala
def setOutput(fileName: String): Unit

Set the logging destination to a file name

Set the logging destination to a file name

Value parameters

fileName

destination name

Attributes

Source
Logger.scala
def setOutput(stream: PrintStream): Unit

Set the logging destination to a print stream

Set the logging destination to a print stream

Value parameters

stream

destination stream

Attributes

Source
Logger.scala