/
BrowserFileLoggerDummy.template
50 lines (44 loc) · 1.22 KB
/
BrowserFileLoggerDummy.template
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
/**
* Performs logging of the events in TypeORM.
* This version of logger logs everything into ormlogs.log file.
*/
export class DummyLogger {
/**
* Logs query and parameters used in it.
*/
logQuery() {
throw new Error('This logger is not applicable in a browser context');
}
/**
* Logs query that is failed.
*/
logQueryError() {
throw new Error('This logger is not applicable in a browser context');
}
/**
* Logs query that is slow.
*/
logQuerySlow() {
throw new Error('This logger is not applicable in a browser context');
}
/**
* Logs events from the schema build process.
*/
logSchemaBuild() {
throw new Error('This logger is not applicable in a browser context');
}
/**
* Logs events from the migrations run process.
*/
logMigration() {
throw new Error('This logger is not applicable in a browser context');
}
/**
* Perform logging using given logger, or by default to the console.
* Log has its own level and message.
*/
log() {
throw new Error('This logger is not applicable in a browser context');
}
}
export class FileLogger extends DummyLogger {}