src/app/services/log.service.ts
Properties |
debug |
debug:
|
Type : function
|
Defined in src/app/services/log.service.ts:5
|
error |
error:
|
Type : function
|
Defined in src/app/services/log.service.ts:8
|
info |
info:
|
Type : function
|
Defined in src/app/services/log.service.ts:4
|
log |
log:
|
Type : function
|
Defined in src/app/services/log.service.ts:6
|
warn |
warn:
|
Type : function
|
Defined in src/app/services/log.service.ts:7
|
import { Injectable } from '@angular/core';
interface ILog {
info: (msg: any) => void;
debug: (msg: any) => void;
log: (msg: any) => void;
warn: (msg: any) => void;
error: (msg: any) => void;
}
@Injectable()
export class LogService implements ILog {
info(msg: any) {
console.info(msg); // info severity;
}
debug(msg: any) {
console.debug(msg); // debug severity;
}
warn(msg: any) {
console.warn(msg); // warn severity;
}
error(msg: any) {
console.error(msg); // error severity;
}
log(message: string | any) {
console.log(message); // log severity
}
}