@zero-version/logging
v9.9.14
Published
Logging utilities.
Downloads
12
Readme
Logging utilities.
Usage
Using an interface allows for multiple implementations, as well as decorator or adapter implementations if needed. See the LoggerConsole for an example implementation.
ILogger
import type { ILogger } from '@zero-version/logging';
export class Logger implements ILogger {
public trace(message: string, ...optionalParams: any[]) {
// Log
}
public debug(message: string, ...optionalParams: any[]) {
// Log
}
public info(message: string, ...optionalParams: any[]) {
// Log
}
public warn(message: string, ...optionalParams: any[]) {
// Log
}
public error(message: string, ...optionalParams: any[]) {
// Log
}
public fatal(message: string, ...optionalParams: any[]) {
// Log
}
}
Support ☕
Are you using a package I've developed and finding it useful? Or have you looked at one of my repositories and learnt something new? If so, please consider buying me a coffee. Thanks!