0.0.6 • Published 7 years ago

rll-logger v0.0.6

Weekly downloads
26
License
-
Repository
github
Last release
7 years ago

rll-logger

Simple logging Angular2 library.

Usage example

In order to use rll-logger in your application, you should follow these steps: 1. Add the dependency to your project:

npm install --save rll-logger
  1. Import it on your application.
    You can configure the logging level by injecting the desired level using the Level class.
import { Level, RllLoggerModule } from 'rll-logger';

@NgModule({
    imports: [
      ...
      RllLoggerModule.forRoot(Level.DEBUG),
      ...
    ],
    declarations: [
      ...
    ],
    providers: [
      ...
    ],
    bootstrap: [ AppComponent ]
})
export class AppModule {}
  1. Add it on your services:
import { LoggerService } from 'rll-logger';

@Injectable()
export class YourService {
    ...
    constructor(private logger: LoggerService) {
    
    }
    ...
    yourFunction() {
        this.logger.debug('This is a debug trace');
    }
    ...
}
0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago