-
Notifications
You must be signed in to change notification settings - Fork 110
/
logger.service.mock.ts
60 lines (42 loc) · 1.33 KB
/
logger.service.mock.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import { HttpHeaders, HttpParams } from '@angular/common/http';
import { Injectable } from "@angular/core";
import { INGXLoggerConfig, INGXLoggerMonitor, NgxLoggerLevel } from 'ngx-logger';
// todo bmtheo, there should be an interface or something to make sure this mock sticks to the real API
@Injectable()
export class NGXLoggerMock {
get level(): NgxLoggerLevel {
return NgxLoggerLevel.ERROR;
}
get serverLogLevel(): NgxLoggerLevel {
return NgxLoggerLevel.OFF;
}
trace(message?: any | (() => any), ...additional: any[]) {
}
debug(message?: any | (() => any), ...additional: any[]) {
}
info(message?: any | (() => any), ...additional: any[]) {
}
log(message?: any | (() => any), ...additional: any[]) {
}
warn(message?: any | (() => any), ...additional: any[]) {
}
error(message?: any | (() => any), ...additional: any[]) {
}
fatal(message?: any | (() => any), ...additional: any[]) {
}
partialUpdateConfig(partialConfig: Partial<INGXLoggerConfig>): void {
}
updateConfig(config: any) {
}
setCustomHttpHeaders(headers: HttpHeaders) {
}
setCustomParams(params: HttpParams) {
}
registerMonitor(monitor: INGXLoggerMonitor) {
}
setWithCredentialsOptionValue(withCredentials: boolean) {
}
getConfigSnapshot(): INGXLoggerConfig {
return { level: NgxLoggerLevel.ERROR };
}
}