Log
Provides well-formatted logging with log level filtering.
Constructor Summary
Public Constructor | ||
public |
Create a new log. |
Method Summary
Public Methods | ||
public |
Adds a new logger, which will process any log methods called. |
|
public |
Alias for .send(Log.DEBUG, ...) / .sendObject(Log.DEBUG, ...) |
|
public |
Alias for .send(Log.ERROR, ...) / .sendObject(Log.ERROR, ...) |
|
public |
Alias for .send(Log.FATAL, ...) / .sendObject(Log.FATAL, ...) |
|
public |
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 |
Alias for .send(Log.WARN, ...) / .sendObject(Log.WARN, ...) |
Public Constructors
Public Methods
public addLogger(logger: Logger) source
Adds a new logger, which will process any log methods called.
Params:
Name | Type | Attribute | Description |
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, ...)
public error(tag: String, text: String, text: Object) source
Alias for .send(Log.ERROR, ...) / .sendObject(Log.ERROR, ...)
public fatal(tag: String, text: String, text: Object) source
Alias for .send(Log.FATAL, ...) / .sendObject(Log.FATAL, ...)
public info(tag: String, text: String, text: Object) source
Alias for .send(Log.INFO, ...) / .sendObject(Log.INFO, ...)
public send(level: type, tag: type, text: type) source
Logs a message to the console
Params:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
level | type | Logging level |
|
tag | type | Logging tag |
|
text | type | Logging text |
|
object | type | Object to be logged |
public setLogPrefix(prefix: *) source
Params:
Name | Type | Attribute | Description |
prefix | * |