Home Manual Reference Source Repository
public class | source

Log

Provides well-formatted logging with log level filtering.

Constructor Summary

Public Constructor
public

Create a new log.

Member Summary

Public Members
public
Private Members
private

Method Summary

Public Methods
public

addLogger(logger: Logger)

Adds a new logger, which will process any log methods called.

public

debug(tag: String, text: String, text: Object)

Alias for .send(Log.DEBUG, ...) / .sendObject(Log.DEBUG, ...)

public

error(tag: String, text: String, text: Object)

Alias for .send(Log.ERROR, ...) / .sendObject(Log.ERROR, ...)

public

fatal(tag: String, text: String, text: Object)

Alias for .send(Log.FATAL, ...) / .sendObject(Log.FATAL, ...)

public

info(tag: String, text: String, text: Object)

Alias for .send(Log.INFO, ...) / .sendObject(Log.INFO, ...)

public

send(level: type, tag: type, text: type)

Logs a message to the console

public

sendObject(level: type, tag: type, text: type, object: type)

Log an object.

public

setLogPrefix(prefix: *)

public

warn(tag: String, text: String, text: Object)

Alias for .send(Log.WARN, ...) / .sendObject(Log.WARN, ...)

Public Constructors

public constructor() source

Create a new log.

Public Members

public loggers: Logger[] source

Private Members

private _logPrefix: String source

Public Methods

public addLogger(logger: Logger) source

Adds a new logger, which will process any log methods called.

Params:

NameTypeAttributeDescription
logger Logger

A new logger to process log requests.

public debug(tag: String, text: String, text: Object) source

Alias for .send(Log.DEBUG, ...) / .sendObject(Log.DEBUG, ...)

Params:

NameTypeAttributeDescription
tag String

Log tag

text String

Log message

text Object
  • optional

Optional object to debug

public error(tag: String, text: String, text: Object) source

Alias for .send(Log.ERROR, ...) / .sendObject(Log.ERROR, ...)

Params:

NameTypeAttributeDescription
tag String

Log tag

text String

Log message

text Object
  • optional

Optional object to debug

public fatal(tag: String, text: String, text: Object) source

Alias for .send(Log.FATAL, ...) / .sendObject(Log.FATAL, ...)

Params:

NameTypeAttributeDescription
tag String

Log tag

text String

Log message

text Object
  • optional

Optional object to debug

public info(tag: String, text: String, text: Object) source

Alias for .send(Log.INFO, ...) / .sendObject(Log.INFO, ...)

Params:

NameTypeAttributeDescription
tag String

Log tag

text String

Log message

text Object
  • optional

Optional object to debug

public send(level: type, tag: type, text: type) source

Logs a message to the console

Params:

NameTypeAttributeDescription
level type

Logging level

tag type

Logging tag

text type

Text to log

public sendObject(level: type, tag: type, text: type, object: type) source

Log an object.

Params:

NameTypeAttributeDescription
level type

Logging level

tag type

Logging tag

text type

Logging text

object type

Object to be logged

public setLogPrefix(prefix: *) source

Params:

NameTypeAttributeDescription
prefix *

public warn(tag: String, text: String, text: Object) source

Alias for .send(Log.WARN, ...) / .sendObject(Log.WARN, ...)

Params:

NameTypeAttributeDescription
tag String

Log tag

text String

Log message

text Object
  • optional

Optional object to debug