@cenk1cenk2/oclif-common 3.4.2 → 3.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/index.js +4 -4
- package/dist/hooks/not-found.hook.js +4 -4
- package/dist/hooks/store.hook.js +4 -4
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/hooks/index.js
CHANGED
|
@@ -66,16 +66,16 @@ var Logger = class {
|
|
|
66
66
|
constructor(context, options) {
|
|
67
67
|
this.context = context;
|
|
68
68
|
this.options = options;
|
|
69
|
-
const
|
|
70
|
-
const
|
|
69
|
+
const parsed = process.env.LOG_LEVEL ?? options?.level ?? "INFO" /* INFO */;
|
|
70
|
+
const level = Object.values(LogLevels).includes(parsed) ? parsed : "INFO" /* INFO */;
|
|
71
71
|
this.options = {
|
|
72
72
|
useIcons: true,
|
|
73
73
|
...options,
|
|
74
|
-
level
|
|
74
|
+
level
|
|
75
75
|
};
|
|
76
76
|
if (Logger.instance) {
|
|
77
|
+
Logger.instance.level = level;
|
|
77
78
|
this.logger = Logger.instance;
|
|
78
|
-
Logger.instance.level = lvl;
|
|
79
79
|
} else {
|
|
80
80
|
this.logger = this.initiateLogger();
|
|
81
81
|
Logger.instance = this.logger;
|
|
@@ -62,16 +62,16 @@ var Logger = class {
|
|
|
62
62
|
constructor(context, options) {
|
|
63
63
|
this.context = context;
|
|
64
64
|
this.options = options;
|
|
65
|
-
const
|
|
66
|
-
const
|
|
65
|
+
const parsed = process.env.LOG_LEVEL ?? options?.level ?? "INFO" /* INFO */;
|
|
66
|
+
const level = Object.values(LogLevels).includes(parsed) ? parsed : "INFO" /* INFO */;
|
|
67
67
|
this.options = {
|
|
68
68
|
useIcons: true,
|
|
69
69
|
...options,
|
|
70
|
-
level
|
|
70
|
+
level
|
|
71
71
|
};
|
|
72
72
|
if (Logger.instance) {
|
|
73
|
+
Logger.instance.level = level;
|
|
73
74
|
this.logger = Logger.instance;
|
|
74
|
-
Logger.instance.level = lvl;
|
|
75
75
|
} else {
|
|
76
76
|
this.logger = this.initiateLogger();
|
|
77
77
|
Logger.instance = this.logger;
|
package/dist/hooks/store.hook.js
CHANGED
|
@@ -65,16 +65,16 @@ var Logger = class {
|
|
|
65
65
|
constructor(context, options) {
|
|
66
66
|
this.context = context;
|
|
67
67
|
this.options = options;
|
|
68
|
-
const
|
|
69
|
-
const
|
|
68
|
+
const parsed = process.env.LOG_LEVEL ?? options?.level ?? "INFO" /* INFO */;
|
|
69
|
+
const level = Object.values(LogLevels).includes(parsed) ? parsed : "INFO" /* INFO */;
|
|
70
70
|
this.options = {
|
|
71
71
|
useIcons: true,
|
|
72
72
|
...options,
|
|
73
|
-
level
|
|
73
|
+
level
|
|
74
74
|
};
|
|
75
75
|
if (Logger.instance) {
|
|
76
|
+
Logger.instance.level = level;
|
|
76
77
|
this.logger = Logger.instance;
|
|
77
|
-
Logger.instance.level = lvl;
|
|
78
78
|
} else {
|
|
79
79
|
this.logger = this.initiateLogger();
|
|
80
80
|
Logger.instance = this.logger;
|
package/dist/index.js
CHANGED
|
@@ -120,16 +120,16 @@ var Logger = class {
|
|
|
120
120
|
constructor(context, options) {
|
|
121
121
|
this.context = context;
|
|
122
122
|
this.options = options;
|
|
123
|
-
const
|
|
124
|
-
const
|
|
123
|
+
const parsed = process.env.LOG_LEVEL ?? options?.level ?? "INFO" /* INFO */;
|
|
124
|
+
const level = Object.values(LogLevels).includes(parsed) ? parsed : "INFO" /* INFO */;
|
|
125
125
|
this.options = {
|
|
126
126
|
useIcons: true,
|
|
127
127
|
...options,
|
|
128
|
-
level
|
|
128
|
+
level
|
|
129
129
|
};
|
|
130
130
|
if (Logger.instance) {
|
|
131
|
+
Logger.instance.level = level;
|
|
131
132
|
this.logger = Logger.instance;
|
|
132
|
-
Logger.instance.level = lvl;
|
|
133
133
|
} else {
|
|
134
134
|
this.logger = this.initiateLogger();
|
|
135
135
|
Logger.instance = this.logger;
|