fix(aio): do not log messages in production
In dev mode, all messages passed to `Logger` will be logged. In production mode, only warnings and errors will be logged. Fixes #17453
This commit is contained in:
parent
0564dd25e2
commit
01173b9441
|
@ -1,11 +1,15 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { environment } from '../../environments/environment';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class Logger {
|
||||
|
||||
log(value: any, ...rest) {
|
||||
if (!environment.production) {
|
||||
console.log(value, ...rest);
|
||||
}
|
||||
}
|
||||
|
||||
error(value: any, ...rest) {
|
||||
console.error(value, ...rest);
|
||||
|
|
Loading…
Reference in New Issue