-
Notifications
You must be signed in to change notification settings - Fork 3
/
logLevels.js
executable file
·125 lines (88 loc) · 3.06 KB
/
logLevels.js
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
import log from 'loglevel';
const a = log.getLogger('address-allocation');
const b = log.getLogger('Bus');
const c = log.getLogger('MessageBus');
const d = log.getLogger('CoreDiscovery');
const e = log.getLogger('StorageManager');
const f = log.getLogger('HypertyResourcesStorage');
const g = log.getLogger('IdentityModule');
const h = log.getLogger('PEP');
const i = log.getLogger('P2PConnectionResolve');
const j = log.getLogger('Registry');
const k = log.getLogger('RuntimeUA');
const l = log.getLogger('Loader');
const m = log.getLogger('Descriptors');
const n = log.getLogger('DataObjectsStorage');
const o = log.getLogger('Subscription');
const p = log.getLogger('SubscriptionManager');
const q = log.getLogger('ObserverObject');
const r = log.getLogger('ReporterObject');
const s = log.getLogger('SynSubscription');
const t = log.getLogger('SyncherManager');
const u = log.getLogger('IdentityHandler');
const v = log.getLogger('CryptoManager');
const x = log.getLogger('Pipeline');
const f1 = log.getLogger('Syncher');
export { log };
/**
0 actual logging methods, ordered and available as:
0 - log.trace(msg)
1 - log.debug(msg)
2 - log.info(msg)
3 - log.warn(msg)
4 - log.error(msg)
log.log(msg) is also available, as an alias for log.debug(msg), to improve compatibility with console, and make migration easier.
Exact output formatting of these will depend on the console available in the current context of your application. For example, many environments will include a full stack trace with all trace() calls, and icons or similar to highlight other calls.
These methods should never fail in any environment, even if no console object is currently available, and should always fall back to an available log method even if the specific method called (e.g. warn) isn't available.
Be aware that all this means that these method won't necessarily always produce exactly the output you expect in every environment; loglevel only guarantees that these methods will never explode on you, and that it will call the most relevant method it can find, with your argument. Firefox is a notable example here: due to a current Firefox bug log.trace(msg) calls in Firefox will print only the stacktrace, and won't include any passed message arguments.
*/
// address-allocation
a.setLevel(0);
// Bus
b.setLevel(3);
// MessageBus
c.setLevel(3);
// CoreDiscovery
d.setLevel(5);
// StorageManager
e.setLevel(0);
// HypertyResourcesStorage
f.setLevel(3);
// IdentityModule
g.setLevel(0);
// PEP
h.setLevel(3);
// P2PConnectionResolve
i.setLevel(3);
// Registry
j.setLevel(0);
// RuntimeUA
k.setLevel(0);
// Loader
l.setLevel(0);
// Descriptors
m.setLevel(3);
// DataObjectsStorage
n.setLevel(0);
// Subscription
o.setLevel(3);
// SubscriptionManager
p.setLevel(3);
// ObserverObject
q.setLevel(0);
// ReporterObject
r.setLevel(0);
// SynSubscription
s.setLevel(3);
// SyncherManager
t.setLevel(0);
// IdentityHandler
u.setLevel(3);
// CryptoManager
v.setLevel(0);
// Pipeline
x.setLevel(0);
// Syncher
f1.setLevel(0);
// Syncher DataObjectObserver
f1.setLevel(0);