kg-logger-service
v1.0.5
Published
Installlation:
Downloads
297
Readme
Installlation:
npm i kg-loggger-service
environments:
export const environment = { "log.level": LogLevel.None };
LOGGER LEVEL =
None,
Debug,
Info,
Warn,
Error
process.env.LOG_LEVEL In order for the Logger to work as you intend, you should set the LOG_LEVEL` environment variable. It must be set to the maximum level
All instances of this wrapper Logger class will use this value specified_.
If
LOG_LEVEL=None
not setIf
LOG_LEVEL=Debug
everything will be logged. (debug
and higher).If
LOG_LEVEL=Info
levelsinfo
and higher will be logged.If
LOG_LEVEL=Warn
levelswarn
and higher will be logged.If
LOG_LEVEL=Error
levelserror
and higher will be logged.If
LOG_LEVEL=INFO,WARNING
you will get an error because you can only set one value.
Usage in a Service or Component
export class AppComponent { constructor( private readonly logger: KgLoggerService ) { this.logger.info("My Name is Keshab Kumar Gantayat"); }