tlojs
Version:
The Last One - The last npm package you'll need to install
27 lines (23 loc) • 578 B
Markdown
# Logger
Logger is a common interface with a few simple implementations
## Ignore Logger
Ignore logger can be used to simply ignore any logs. This is useful in CI/CD pipelines
## Console Logger
Ignore logger implements the same interface, but outputs to the console.
## Usage
```typescript
class Example {
constructor(private logger: ConsoleLogger) {
// Outputs to the console
this.logger.info('Example')
}
}
class Example {
constructor(private logger: IgnoreLogger) {
// Ignores output
this.logger.info('Example')
}
}
```