Logger
Extends:
Constructor Summary
Public Constructor | ||
public |
constructor(name: string, loggerSingleton: LoggerSingleton) |
Method Summary
Public Methods | ||
public |
|
|
public |
getLogLevel(): int Get the log level. |
|
public |
Get textual name for the log level. |
|
public |
setLogLevel(logLevel: int) Set the loglevel for this logger. |
Inherited Summary
From class AbstractLogger | ||
public get |
Exposes console.log. |
|
public get |
Exposes console.error. |
|
public get |
Exposes console.log. |
|
public get |
isDebug: * Returns |
|
public get |
isError: * Returns |
|
public get |
isInfo: * Returns |
|
public get |
isWarning: * Returns |
|
public get |
Exposes console.warn. |
|
public |
|
Public Constructors
public constructor(name: string, loggerSingleton: LoggerSingleton) source
Params:
Name | Type | Attribute | Description |
name | string | The name of the logger. |
|
loggerSingleton | LoggerSingleton | The logger singleton this logger belongs to. |
Public Methods
public getLogLevel(): int source
Get the log level.
If no log level has been set with Logger#setLogLevel, this returns LoggerSingleton#getDefaultLogLevel.
Override:
AbstractLogger#getLogLevelReturn:
int |
public getTextualNameForLogLevel(): string source
Get textual name for the log level. If the logger does not have a logLevel (if it inherits it from the LoggerSingleton) a string with information about this and the default logLevel for the LoggerSingleton is returned.
Intended for debugging. The format of the string may change.
public setLogLevel(logLevel: int) source
Set the loglevel for this logger.
Params:
Name | Type | Attribute | Description |
logLevel | int | The log level. Must be one of the loglevels defined in LogLevels. |
Throw:
if LogLevels#validateLogLevel fails. |