-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathlogform+1.10.0.patch
60 lines (59 loc) · 1.8 KB
/
logform+1.10.0.patch
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
diff --git a/node_modules/logform/index.js b/node_modules/logform/index.js
index 2f2cc63..035ce46 100644
--- a/node_modules/logform/index.js
+++ b/node_modules/logform/index.js
@@ -15,38 +15,22 @@ const format = exports.format = require('./format');
*/
exports.levels = require('./levels');
-/*
- * @api private
- * method {function} exposeFormat
- * Exposes a sub-format on the main format object
- * as a lazy-loaded getter.
- */
-function exposeFormat(name, path) {
- path = path || name;
- Object.defineProperty(format, name, {
- get() {
- return require(`./${path}.js`);
- },
- configurable: true
- });
-}
-
//
-// Setup all transports as lazy-loaded getters.
+// Setup all transports directly because these are a part of the V8 snapshot.
//
-exposeFormat('align');
-exposeFormat('cli');
-exposeFormat('combine');
-exposeFormat('colorize');
-exposeFormat('json');
-exposeFormat('label');
-exposeFormat('logstash');
-exposeFormat('metadata');
-exposeFormat('ms');
-exposeFormat('padLevels', 'pad-levels');
-exposeFormat('prettyPrint', 'pretty-print');
-exposeFormat('printf');
-exposeFormat('simple');
-exposeFormat('splat');
-exposeFormat('timestamp');
-exposeFormat('uncolorize');
+format.align = require('./align');
+format.cli = require('./cli');
+format.combine = require('./combine');
+format.colorize = require('./colorize');
+format.json = require('./json');
+format.label = require('./label');
+format.logstash = require('./logstash');
+format.metadata = require('./metadata');
+format.ms = require('./ms');
+format.padLevels = require('./pad-levels');
+format.prettyPrint = require('./pretty-print');
+format.printf = require('./printf');
+format.simple = require('./simple');
+format.splat = require('./splat');
+format.timestamp = require('./timestamp');
+format.uncolorize = require('./uncolorize');