Created
September 5, 2021 01:11
-
-
Save rodrigokamada/e4217a5ac92bf9898f1aa41ef88fa341 to your computer and use it in GitHub Desktop.
Angular Logger - Step 6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { NGXLogger } from 'ngx-logger'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.scss'], | |
}) | |
export class AppComponent { | |
constructor(private logger: NGXLogger) { | |
} | |
public showTrace(): void { | |
this.logger.trace('TRACE level'); | |
} | |
public showDebug(): void { | |
this.logger.debug('DEBUG level'); | |
} | |
public showInfo(): void { | |
this.logger.info('INFO level'); | |
} | |
public showWarn(): void { | |
this.logger.warn('WARN level'); | |
} | |
public showError(): void { | |
this.logger.error('ERROR level'); | |
} | |
public showFatal(): void { | |
this.logger.fatal('FATAL level'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment