src/app/services/log.service.ts
Methods |
debug | ||||||
debug(msg: any)
|
||||||
Defined in src/app/services/log.service.ts:16
|
||||||
Parameters :
Returns :
void
|
error | ||||||
error(msg: any)
|
||||||
Defined in src/app/services/log.service.ts:22
|
||||||
Parameters :
Returns :
void
|
info | ||||||
info(msg: any)
|
||||||
Defined in src/app/services/log.service.ts:13
|
||||||
Parameters :
Returns :
void
|
log | ||||||
log(message: string | any)
|
||||||
Defined in src/app/services/log.service.ts:25
|
||||||
Parameters :
Returns :
void
|
warn | ||||||
warn(msg: any)
|
||||||
Defined in src/app/services/log.service.ts:19
|
||||||
Parameters :
Returns :
void
|
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
}
}