SmartLoggerSlf4JInfo

com.phasmidsoftware.lascala.fp.SmartLoggerSlf4JInfo
See theSmartLoggerSlf4JInfo companion object
case class SmartLoggerSlf4JInfo(logger: Logger) extends SmartLogger

A logger which will log as info on an Slf4J logger

Value parameters

logger

an Slf4J logger

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait SmartLogger
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def errorFunc: (String, Throwable) => Unit

The function to be used for logging any thrown exceptions. Normally this will be something like the warn method of a standard logger.

The function to be used for logging any thrown exceptions. Normally this will be something like the warn method of a standard logger.

Attributes

Returns

nothing

def logFunc: String => Unit

The function to be used for logging the start and end. Normally this will be something like the debug method of a standard logger.

The function to be used for logging the start and end. Normally this will be something like the debug method of a standard logger.

Attributes

Returns

nothing

Inherited methods

def apply[V](name: String)(f: => V): V

The apply function of the SmartLogger. This method can be applied to any expression such that the start of the expression will be logged, as well as the end of the expression.

The apply function of the SmartLogger. This method can be applied to any expression such that the start of the expression will be logged, as well as the end of the expression.

Note that the type V is defined only for this method, not for the SmartLogger trait. That way we can use the same SmartLogger for any expression.

Type parameters

V

the type of the expression's result

Value parameters

f

the function which implements the expression

name

the name (identifier) of the expression that we are logging

Attributes

Returns

the result of the expression

Inherited from:
SmartLogger
def endFormatter(name: String, x: => String): String

The formatter for the end message.

The formatter for the end message.

Value parameters

name

the name/identifier of the expression

x

the String representing the expression's result (call-by-name so that it isn't evaluated if we don'x need it)

Attributes

Returns

a String to be output. If the string is null, then no end message will be logged

Inherited from:
SmartLogger
def exceptionCreator(name: String, ex: Throwable): Throwable

A method to create an exception to be returned to the caller in the event of an exception being thrown by the expression

A method to create an exception to be returned to the caller in the event of an exception being thrown by the expression

Value parameters

ex

the exception that was actually thrown

name

the name/identifier of the expression

Attributes

Returns

an exception which will be thrown by the apply method. Normally this will wrap the thrown exception.

Inherited from:
SmartLogger
def milestone()(values: Any*): Unit

log a milestone with the next sequential number and the given values

log a milestone with the next sequential number and the given values

Value parameters

values

the values to be shown for this milestone (0, 1, or N values)

Attributes

Inherited from:
SmartLogger
def milestone(x: Int)(values: Any*): Unit

log a milestone with this number and values

log a milestone with this number and values

Value parameters

values

the values to be shown for this milestone (0, 1, or N values)

x

the number of this milestone

Attributes

Inherited from:
SmartLogger
def milestone(name: String)(values: Any*): Unit

log a milestone with this name and values

log a milestone with this name and values

Value parameters

name

the name of this milestone

values

the values to be shown for this milestone (0, 1, or N values)

Attributes

Inherited from:
SmartLogger
def milestoneFormatter(name: String)(values: Any*): String

The formatter for the milestone messages.

The formatter for the milestone messages.

Value parameters

name

the name/identifier of the milestone

values

the values to be output after the name

Attributes

Returns

a String to be output.

Inherited from:
SmartLogger
def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
def startFormatter(name: String): String

The formatter for the start message.

The formatter for the start message.

Value parameters

name

the name/identifier of the expression

Attributes

Returns

a String to be output. If the string is null, then no start message will be logged

Inherited from:
SmartLogger

Inherited fields

var ms: Int

Attributes

Inherited from:
SmartLogger