GenericLogFunction

com.phasmidsoftware.flog.GenericLogFunction
case class GenericLogFunction(f: String => Any, enabled: Boolean) extends LogFunction

LogFunction which is a function of String => Unit (except that the String parameter is defined to be call-by-name). NOTE: the type of f must be (String => Any) because many suitable functions will in fact yield a non-Unit result.

Value parameters

f

a function which takes a String and returns any type. It is expected that f causes some side-effect such as writing to a log file. The actual result of invoking f is ignored.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait LogFunction
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def apply(w: => String): Unit

Apply method for LogFunction which processes the given string w provided that enabled is true.

Apply method for LogFunction which processes the given string w provided that enabled is true.

Value parameters

w

a String to be logged.

Attributes

Method to instantiate a new LogFunction with the same value of f, but with enabled set to false.

Method to instantiate a new LogFunction with the same value of f, but with enabled set to false.

Attributes

Returns

a LogFunction which does nothing.

def isDebugEnabled: Boolean

Determines if the debug logging level is enabled.

Determines if the debug logging level is enabled.

Attributes

Returns

true if debug logging is enabled, false otherwise.

def isInfoEnabled: Boolean

Checks if the "info" logging level is currently enabled.

Checks if the "info" logging level is currently enabled.

Attributes

Returns

true if "info" logging is enabled, otherwise false.

def isTraceEnabled: Boolean

Indicates whether trace-level logging is enabled.

Indicates whether trace-level logging is enabled.

Attributes

Returns

true if trace logging is enabled, false otherwise.

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product