https://github.com/angular/angular
Raw File
Tip revision: 3aaf43f73c17570f61d3d0cc672a01695b716499 authored by Misko Hevery on 25 January 2018, 05:26:17 UTC
docs: add changelog for 5.2.2
Tip revision: 3aaf43f
logger.service.ts
import { Injectable } from '@angular/core';
import { environment } from '../../environments/environment';


@Injectable()
export class Logger {

  log(value: any, ...rest: any[]) {
    if (!environment.production) {
      console.log(value, ...rest);
    }
  }

  error(value: any, ...rest: any[]) {
    console.error(value, ...rest);
  }

  warn(value: any, ...rest: any[]) {
    console.warn(value, ...rest);
  }
}
back to top