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,10 +1,14 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { environment } from '../../environments/environment';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class Logger {
|
||||
|
||||
log(value: any, ...rest) {
|
||||
console.log(value, ...rest);
|
||||
if (!environment.production) {
|
||||
console.log(value, ...rest);
|
||||
}
|
||||
}
|
||||
|
||||
error(value: any, ...rest) {
|
||||
|
|
Loading…
Reference in New Issue