aiiinotate 0.10.2 → 0.10.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/config/.env.template +1 -1
- package/package.json +1 -1
- package/src/constants.js +6 -0
- package/import_manifests.txt +0 -1734
package/config/.env.template
CHANGED
|
@@ -18,7 +18,7 @@ AIIINOTATE_SCHEME=http
|
|
|
18
18
|
AIIINOTATE_LOG_TARGET=stdout
|
|
19
19
|
# directory to save logs to (if AIIINOTATE_LOG_TARGET enables logging to file)
|
|
20
20
|
AIIINOTATE_LOG_DIR=
|
|
21
|
-
# log level. "debug"|"info"|"
|
|
21
|
+
# log level. "trace"|"debug"|"info"|"warn"|"error"|"fatal"
|
|
22
22
|
AIIINOTATE_LOG_LEVEL=debug
|
|
23
23
|
|
|
24
24
|
|
package/package.json
CHANGED
package/src/constants.js
CHANGED
|
@@ -42,6 +42,12 @@ if (Object.values(env_mapper).some(e => e==null)) {
|
|
|
42
42
|
process.exit(1);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
const allowedLogLevels = [ "trace", "debug", "info", "warn", "error", "fatal" ];
|
|
46
|
+
if (!allowedLogLevels.includes(LOG_LEVEL)) {
|
|
47
|
+
console.error(`SETUP ERROR: env variable AIIINOTATE_LOG_TARGET must be set to one of ${allowedLogLevels.map(x => "\"" + x + "\"").join(", ")}. Got "${LOG_LEVEL}". Exiting...`)
|
|
48
|
+
process.exit(1);
|
|
49
|
+
}
|
|
50
|
+
|
|
45
51
|
// enforce value constraints on variables
|
|
46
52
|
const allowedLogTargets = [ "file", "stdout", "stdout+file", "off" ];
|
|
47
53
|
if (!allowedLogTargets.includes(LOG_TARGET)) {
|