import { Injectable , Inject , forwardRef } from '@angular/core' ; import { Config , ConsoleService } from '../index' ; @ Injectable ( ) export class LogService { constructor ( @ Inject ( forwardRef ( ( ) => ConsoleService ) ) public logger ) { } public debug ( msg ) { if ( Config . DEBUG . LEVEL_4 ) { this . logger . log ( msg ) ; } } public keys ( data , printValue ? ) { if ( Config . DEBUG . LEVEL_4 ) { this . logger . keys ( data , printValue ) ; } } public error ( err ) { if ( Config . DEBUG . LEVEL_4 || Config . DEBUG . LEVEL_3 ) { this . logger . error ( err ) ; } } public warn ( err ) { if ( Config . DEBUG . LEVEL_4 || Config . DEBUG . LEVEL_2 ) { this . logger . warn ( err ) ; } } public info ( err ) { if ( Config . DEBUG . LEVEL_4 || Config . DEBUG . LEVEL_1 ) { this . logger . info ( err ) ; } } }