zeddemore-logger 2.0.1 → 2.0.2
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/lib/ZeddemoreBase.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2025 by Beardon Services, Inc.
|
|
1
|
+
// Copyright (c) 2025-2026 by Beardon Services, Inc.
|
|
2
2
|
|
|
3
3
|
const _ = require('lodash');
|
|
4
4
|
const chalk = require('chalk');
|
|
@@ -6,7 +6,7 @@ const { DateTime } = require('luxon');
|
|
|
6
6
|
|
|
7
7
|
const { convertFechaDateFormatToLuxon } = require('./date');
|
|
8
8
|
const defaults = require('./defaults');
|
|
9
|
-
const { isValidLogLevel, logLevelToWinstonLogLevelName
|
|
9
|
+
const { isValidLogLevel, logLevelToWinstonLogLevelName } = require('./logging');
|
|
10
10
|
const { stringToIdempotentHexColor } = require('./color');
|
|
11
11
|
require('./typedef');
|
|
12
12
|
|
|
@@ -128,7 +128,7 @@ class ZeddemoreBase {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
get logLevelName() {
|
|
131
|
-
return
|
|
131
|
+
return logLevelToWinstonLogLevelName(this.logLevel);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
get luxonTimestampFormat() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// Copyright (c) 2024-
|
|
1
|
+
// Copyright (c) 2024-2026 by Beardon Services, Inc.
|
|
2
2
|
|
|
3
3
|
const _ = require('lodash');
|
|
4
4
|
const enums = require('../enums');
|
|
5
5
|
|
|
6
|
-
const { ansiColors: ac, databaseOperations: dbo, chalkFormats: cf, hexColors: hc, httpMethods: http,
|
|
6
|
+
const { ansiColors: ac, databaseOperations: dbo, chalkFormats: cf, hexColors: hc, httpMethods: http, winstonLogLevelNames: wlln } = enums;
|
|
7
7
|
|
|
8
8
|
const databaseOperationColors = [
|
|
9
9
|
{ match: dbo.DELETE, style: { format: cf.HEX, fore: hc.DB_DELETE, back: null } },
|
|
@@ -34,13 +34,13 @@ const httpVerbColors = [
|
|
|
34
34
|
];
|
|
35
35
|
|
|
36
36
|
const logLevelColors = [
|
|
37
|
-
{ match:
|
|
38
|
-
{ match:
|
|
39
|
-
{ match:
|
|
40
|
-
{ match:
|
|
41
|
-
{ match:
|
|
42
|
-
{ match:
|
|
43
|
-
{ match:
|
|
37
|
+
{ match: wlln.ERROR, style: { format: cf.ANSI, fore: ac.LOG_LEVEL_ERROR, back: null } },
|
|
38
|
+
{ match: wlln.WARNING, style: { format: cf.ANSI, fore: ac.LOG_LEVEL_WARNING, back: null } },
|
|
39
|
+
{ match: wlln.INFO, style: { format: cf.ANSI, fore: ac.LOG_LEVEL_INFO, back: null } },
|
|
40
|
+
{ match: wlln.HTTP, style: { format: cf.ANSI, fore: ac.LOG_LEVEL_HTTP, back: null } },
|
|
41
|
+
{ match: wlln.VERBOSE, style: { format: cf.ANSI, fore: ac.LOG_LEVEL_VERBOSE, back: null } },
|
|
42
|
+
{ match: wlln.DEBUG, style: { format: cf.ANSI, fore: ac.LOG_LEVEL_DEBUG, back: null } },
|
|
43
|
+
{ match: wlln.SILLY, style: { format: cf.ANSI, fore: ac.LOG_LEVEL_SILLY, back: null } },
|
|
44
44
|
];
|
|
45
45
|
|
|
46
46
|
const packageColors = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zeddemore-logger",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Node.js Express logger using Morgan and Winston for thread and caller info tracking",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"chalk": "^4.1.2",
|
|
24
24
|
"cli-progress": "^3.12.0",
|
|
25
|
-
"lodash": "^4.17.
|
|
25
|
+
"lodash": "^4.17.23",
|
|
26
26
|
"luxon": "^3.7.1",
|
|
27
27
|
"morgan": "^1.10.1",
|
|
28
28
|
"object-sizeof": "^2.6.5",
|