logger service - mindsers/yabf GitHub Wiki
abstract class LoggerService {
output: ILoggerOutput
constructor()
registerScope(namespace: string): LogFunction
log(namespace: string, message: string): void
}
LoggerService
is used by Yabf to show info/debug message into the standard error output. It is also available for use in your own app.
Initialize LoggerService
instance.
constructor()
No parameters.
LoggerService
write messages within a scope. You can register a new scope using this method.
registerScope(namespace: string): LogFunction
-
namespace
: the identifier of the scope. (e.g.yabf:logger
)
Return a simple log function which writes messages in the predefined scope. See LogFunction
for more details.
It is the regular log function of the service.
log(namespace: string, message: string): void
-
namespace
: the identifier of the scope. (e.g.yabf:logger
) -
message
: the text that will be displayed
The result is pushed to stderr
. This method returns nothing. void