https://github.com/angular/angular
Raw File
Tip revision: 530b824faa29460a87c2401bc61d22a7fb56f939 authored by Alex Rickabaugh on 07 February 2018, 18:19:39 UTC
docs: add changelog for 5.2.4
Tip revision: 530b824
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