This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| import { environment } from '../../../environments/environment'; | |
| export interface ILoggerService { | |
| info(value: any, ...rest: any[]): void; | |
| log(value: any, ...rest: any[]): void; | |
| warn(value: any, ...rest: any[]): void; | |
| error(value: any, ...rest: any[]): void; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (environment.production) { | |
| enableProdMode(); | |
| // HACK: Don't log to console in production environment. | |
| // TODO: This can be done in better way using logger service and logger factory. | |
| if(window){ | |
| window.console.log = window.console.warn = window.console.info = function(){ | |
| // Don't log anything. | |
| }; | |
| } |