7.1.0 • Published 5 years ago
@bizappframework/ng-logging v7.1.0
ng-logging
Contains logging abstractions and a few implementations for Angular projects based on Microsoft ASP.Net Logging.
Installation
npm install @bizappframework/ng-logging
Setup
import { ConsoleLoggerModule, LoggerModule } from '@bizappframework/ng-logging';
@NgModule({
imports: [
// Other module imports
// Logging
LoggerModule.forRoot({ minLevel: 'trace' }),
ConsoleLoggerModule
]
})
export class AppModule { }
Usage
import { Component, OnInit } from '@angular/core';
import { Logger, LoggerFactory } from '@bizappframework/ng-logging';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent implements OnInit {
private readonly _logger: Logger;
constructor(loggerFactory: LoggerFactory) {
this._logger = loggerFactory.createLogger('app');
}
ngOnInit(): void {
this._logger.trace('Testing trace');
this._logger.debug('Testing debug');
this._logger.info('Testing info');
this._logger.warn('Testing warn');
this._logger.error('Testing error');
}
}
Example
License
7.1.0
5 years ago
7.0.0
5 years ago
6.1.4
5 years ago
6.1.3
5 years ago
6.0.0-beta.1
5 years ago
6.0.0-beta.0
5 years ago
5.0.0-beta.6
6 years ago
5.0.0-beta.5
6 years ago
5.0.0-beta.4
6 years ago
5.0.0-beta.3
6 years ago
5.0.0-beta.2
6 years ago
5.0.0-beta.0
6 years ago