@unchainedshop/logger 2.0.0-rc.3 → 2.0.0
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/jest.config.js +3 -0
- package/lib/createLogger.js +18 -8
- package/lib/createLogger.js.map +1 -1
- package/lib/log.d.ts +2 -2
- package/lib/log.js +5 -2
- package/lib/log.js.map +1 -1
- package/lib/logger-index.d.ts +3 -3
- package/lib/logger-index.js +3 -3
- package/lib/logger-index.js.map +1 -1
- package/lib/logger.types.js +1 -1
- package/lib/logger.types.js.map +1 -1
- package/package.json +6 -6
- package/src/createLogger.ts +24 -10
- package/src/log.ts +7 -4
- package/src/logger-index.ts +3 -3
- package/tsconfig.json +4 -22
package/jest.config.js
CHANGED
package/lib/createLogger.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { createLogger as createWinstonLogger, format, transports } from 'winston';
|
|
2
|
-
import
|
|
3
|
-
import { LogLevel } from './logger.types';
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import { LogLevel } from './logger.types.js';
|
|
4
|
+
const require = createRequire(import.meta.url);
|
|
5
|
+
const { stringify } = require('safe-stable-stringify');
|
|
4
6
|
const { DEBUG = '', LOG_LEVEL = LogLevel.Info, UNCHAINED_LOG_FORMAT = 'unchained' } = process.env;
|
|
5
|
-
const { combine,
|
|
7
|
+
const { combine, colorize, json } = format;
|
|
6
8
|
const debugStringContainsModule = (debugString, moduleName) => {
|
|
7
9
|
if (!debugString)
|
|
8
10
|
return false;
|
|
@@ -22,13 +24,20 @@ const debugStringContainsModule = (debugString, moduleName) => {
|
|
|
22
24
|
}, undefined);
|
|
23
25
|
return loggingMatched || false;
|
|
24
26
|
};
|
|
25
|
-
const myFormat = printf(({ level, message, label
|
|
27
|
+
const myFormat = format.printf(({ level, message, label, timestamp, stack, ...rest }) => {
|
|
26
28
|
const otherPropsString = stringify(rest);
|
|
27
|
-
return
|
|
29
|
+
return [
|
|
30
|
+
`${timestamp} [${label}] ${level}:`,
|
|
31
|
+
`${message}`,
|
|
32
|
+
`${otherPropsString}`,
|
|
33
|
+
stack ? `\n${stack}` : null,
|
|
34
|
+
]
|
|
35
|
+
.filter(Boolean)
|
|
36
|
+
.join(' ');
|
|
28
37
|
});
|
|
29
38
|
const UnchainedLogFormats = {
|
|
30
|
-
unchained:
|
|
31
|
-
json,
|
|
39
|
+
unchained: combine(colorize(), myFormat),
|
|
40
|
+
json: json(),
|
|
32
41
|
};
|
|
33
42
|
if (!UnchainedLogFormats[UNCHAINED_LOG_FORMAT.toLowerCase()]) {
|
|
34
43
|
throw new Error(`UNCHAINED_LOG_FORMAT is invalid, use one of ${Object.keys(UnchainedLogFormats).join(',')}`);
|
|
@@ -37,9 +46,10 @@ export { transports, format };
|
|
|
37
46
|
export const createLogger = (moduleName, moreTransports = []) => {
|
|
38
47
|
const loggingMatched = debugStringContainsModule(DEBUG, moduleName);
|
|
39
48
|
return createWinstonLogger({
|
|
49
|
+
format: format.combine(format.errors({ stack: process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test' }), format.timestamp(), format.label({ label: moduleName })),
|
|
40
50
|
transports: [
|
|
41
51
|
new transports.Console({
|
|
42
|
-
format: UnchainedLogFormats[UNCHAINED_LOG_FORMAT]
|
|
52
|
+
format: UnchainedLogFormats[UNCHAINED_LOG_FORMAT],
|
|
43
53
|
stderrLevels: [LogLevel.Error],
|
|
44
54
|
consoleWarnLevels: [LogLevel.Warning],
|
|
45
55
|
level: loggingMatched ? LogLevel.Debug : LOG_LEVEL,
|
package/lib/createLogger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createLogger.js","sourceRoot":"","sources":["../src/createLogger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"createLogger.js","sourceRoot":"","sources":["../src/createLogger.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ACzB,MAAM,EAAE,MAAM,CAAC,OAAO,CACpB,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC,EAClG,MAAM,CAAC,SAAS,EAAE,EAClB,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CACpC;QACD,UAAU,EAAE;YACV,IAAI,UAAU,CAAC,OAAO,CAAC;gBACrB,MAAM,EAAE,mBAAmB,CAAC,oBAAoB,CAAC;gBACjD,YAAY,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;gBAC9B,iBAAiB,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;gBACrC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;aACnD,CAAC;YACF,GAAG,cAAc;SAClB;KACF,CAAC,CAAC;AACL,CAAC,CAAC"}
|
package/lib/log.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import winston from 'winston';
|
|
2
|
-
import { LogOptions } from './logger.types';
|
|
3
|
-
export declare const log: (message: string, options?: LogOptions) => winston.Logger;
|
|
2
|
+
import { LogOptions } from './logger.types.js';
|
|
3
|
+
export declare const log: (message: string | Error, options?: LogOptions) => winston.Logger;
|
package/lib/log.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { LogLevel } from './logger.types';
|
|
2
|
-
import { createLogger } from './createLogger';
|
|
1
|
+
import { LogLevel } from './logger.types.js';
|
|
2
|
+
import { createLogger } from './createLogger.js';
|
|
3
3
|
const logger = createLogger('unchained');
|
|
4
4
|
export const log = (message, options) => {
|
|
5
|
+
if (!options?.level) {
|
|
6
|
+
return logger.info(message, options);
|
|
7
|
+
}
|
|
5
8
|
const { level = LogLevel.Info, ...meta } = options || {};
|
|
6
9
|
return logger.log(level, message, meta);
|
|
7
10
|
};
|
package/lib/log.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.js","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAc,MAAM,
|
|
1
|
+
{"version":3,"file":"log.js","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAc,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,MAAM,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;AAEzC,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,OAAuB,EAAE,OAAoB,EAAkB,EAAE;IACnF,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE;QACnB,OAAO,MAAM,CAAC,IAAI,CAAC,OAAc,EAAE,OAAO,CAAC,CAAC;KAC7C;IACD,MAAM,EAAE,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IACzD,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,OAAc,EAAE,IAAI,CAAC,CAAC;AACjD,CAAC,CAAC"}
|
package/lib/logger-index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLogger, format, transports } from './createLogger';
|
|
2
|
-
import { LogLevel } from './logger.types';
|
|
3
|
-
import { log } from './log';
|
|
1
|
+
import { createLogger, format, transports } from './createLogger.js';
|
|
2
|
+
import { LogLevel } from './logger.types.js';
|
|
3
|
+
import { log } from './log.js';
|
|
4
4
|
export { log, createLogger, format, transports, LogLevel };
|
package/lib/logger-index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createLogger, format, transports } from './createLogger';
|
|
2
|
-
import { LogLevel } from './logger.types';
|
|
3
|
-
import { log } from './log';
|
|
1
|
+
import { createLogger, format, transports } from './createLogger.js';
|
|
2
|
+
import { LogLevel } from './logger.types.js';
|
|
3
|
+
import { log } from './log.js';
|
|
4
4
|
export { log, createLogger, format, transports, LogLevel };
|
|
5
5
|
//# sourceMappingURL=logger-index.js.map
|
package/lib/logger-index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger-index.js","sourceRoot":"","sources":["../src/logger-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"logger-index.js","sourceRoot":"","sources":["../src/logger-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC"}
|
package/lib/logger.types.js
CHANGED
package/lib/logger.types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.types.js","sourceRoot":"","sources":["../src/logger.types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,CAAN,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,2BAAe,CAAA;IACf,4BAAgB,CAAA;AAClB,CAAC,EANW,QAAQ,KAAR,QAAQ,QAMnB"}
|
|
1
|
+
{"version":3,"file":"logger.types.js","sourceRoot":"","sources":["../src/logger.types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,CAAN,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,2BAAe,CAAA;IACf,4BAAgB,CAAA;AAClB,CAAC,EANW,QAAQ,GAAR,QAAQ,KAAR,QAAQ,QAMnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/logger",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"main": "lib/logger-index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./lib/logger-index.js",
|
|
@@ -31,16 +31,16 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/unchainedshop/unchained#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"safe-stable-stringify": "^2.4.
|
|
34
|
+
"safe-stable-stringify": "^2.4.2",
|
|
35
35
|
"winston": "^3.8.2",
|
|
36
36
|
"winston-transport": "^4.5.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/jest": "^29.
|
|
39
|
+
"@types/jest": "^29.4.0",
|
|
40
40
|
"@types/node": "^18.11.18",
|
|
41
|
-
"@unchainedshop/types": "^2.0.0
|
|
42
|
-
"jest": "^29.
|
|
43
|
-
"ts-jest": "^29.0.
|
|
41
|
+
"@unchainedshop/types": "^2.0.0",
|
|
42
|
+
"jest": "^29.4.1",
|
|
43
|
+
"ts-jest": "^29.0.5",
|
|
44
44
|
"typescript": "^4.9.4"
|
|
45
45
|
}
|
|
46
46
|
}
|
package/src/createLogger.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { createLogger as createWinstonLogger, format, transports } from 'winston';
|
|
2
|
-
import stringify from 'safe-stable-stringify';
|
|
3
2
|
import TransportStream from 'winston-transport';
|
|
4
|
-
import {
|
|
3
|
+
import { createRequire } from 'module';
|
|
4
|
+
import { LogLevel } from './logger.types.js';
|
|
5
|
+
|
|
6
|
+
const require = createRequire(import.meta.url);
|
|
7
|
+
const { stringify } = require('safe-stable-stringify');
|
|
5
8
|
|
|
6
9
|
const { DEBUG = '', LOG_LEVEL = LogLevel.Info, UNCHAINED_LOG_FORMAT = 'unchained' } = process.env;
|
|
7
10
|
|
|
8
|
-
const { combine,
|
|
11
|
+
const { combine, colorize, json } = format;
|
|
9
12
|
|
|
10
13
|
const debugStringContainsModule = (debugString: string, moduleName: string) => {
|
|
11
14
|
if (!debugString) return false;
|
|
@@ -25,15 +28,21 @@ const debugStringContainsModule = (debugString: string, moduleName: string) => {
|
|
|
25
28
|
return loggingMatched || false;
|
|
26
29
|
};
|
|
27
30
|
|
|
28
|
-
const myFormat = printf(({ level, message, label
|
|
29
|
-
const otherPropsString = stringify(rest);
|
|
30
|
-
return
|
|
31
|
+
const myFormat = format.printf(({ level, message, label, timestamp, stack, ...rest }) => {
|
|
32
|
+
const otherPropsString: string = stringify(rest);
|
|
33
|
+
return [
|
|
34
|
+
`${timestamp} [${label}] ${level}:`,
|
|
35
|
+
`${message}`,
|
|
36
|
+
`${otherPropsString}`,
|
|
37
|
+
stack ? `\n${stack}` : null,
|
|
38
|
+
]
|
|
39
|
+
.filter(Boolean)
|
|
40
|
+
.join(' ');
|
|
31
41
|
});
|
|
32
42
|
|
|
33
43
|
const UnchainedLogFormats = {
|
|
34
|
-
unchained: (
|
|
35
|
-
|
|
36
|
-
json,
|
|
44
|
+
unchained: combine(colorize(), myFormat),
|
|
45
|
+
json: json(),
|
|
37
46
|
};
|
|
38
47
|
|
|
39
48
|
if (!UnchainedLogFormats[UNCHAINED_LOG_FORMAT.toLowerCase()]) {
|
|
@@ -47,9 +56,14 @@ export { transports, format };
|
|
|
47
56
|
export const createLogger = (moduleName: string, moreTransports: Array<TransportStream> = []) => {
|
|
48
57
|
const loggingMatched = debugStringContainsModule(DEBUG, moduleName);
|
|
49
58
|
return createWinstonLogger({
|
|
59
|
+
format: format.combine(
|
|
60
|
+
format.errors({ stack: process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test' }),
|
|
61
|
+
format.timestamp(),
|
|
62
|
+
format.label({ label: moduleName }),
|
|
63
|
+
),
|
|
50
64
|
transports: [
|
|
51
65
|
new transports.Console({
|
|
52
|
-
format: UnchainedLogFormats[UNCHAINED_LOG_FORMAT]
|
|
66
|
+
format: UnchainedLogFormats[UNCHAINED_LOG_FORMAT],
|
|
53
67
|
stderrLevels: [LogLevel.Error],
|
|
54
68
|
consoleWarnLevels: [LogLevel.Warning],
|
|
55
69
|
level: loggingMatched ? LogLevel.Debug : LOG_LEVEL,
|
package/src/log.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import winston from 'winston';
|
|
2
|
-
import { LogLevel, LogOptions } from './logger.types';
|
|
3
|
-
import { createLogger } from './createLogger';
|
|
2
|
+
import { LogLevel, LogOptions } from './logger.types.js';
|
|
3
|
+
import { createLogger } from './createLogger.js';
|
|
4
4
|
|
|
5
5
|
const logger = createLogger('unchained');
|
|
6
6
|
|
|
7
|
-
export const log = (message: string, options?: LogOptions): winston.Logger => {
|
|
7
|
+
export const log = (message: string | Error, options?: LogOptions): winston.Logger => {
|
|
8
|
+
if (!options?.level) {
|
|
9
|
+
return logger.info(message as any, options);
|
|
10
|
+
}
|
|
8
11
|
const { level = LogLevel.Info, ...meta } = options || {};
|
|
9
|
-
return logger.log(level, message, meta);
|
|
12
|
+
return logger.log(level, message as any, meta);
|
|
10
13
|
};
|
package/src/logger-index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createLogger, format, transports } from './createLogger';
|
|
2
|
-
import { LogLevel } from './logger.types';
|
|
3
|
-
import { log } from './log';
|
|
1
|
+
import { createLogger, format, transports } from './createLogger.js';
|
|
2
|
+
import { LogLevel } from './logger.types.js';
|
|
3
|
+
import { log } from './log.js';
|
|
4
4
|
|
|
5
5
|
export { log, createLogger, format, transports, LogLevel };
|
package/tsconfig.json
CHANGED
|
@@ -1,29 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
+
"extends": "../shared/base.tsconfig.json",
|
|
2
3
|
"compilerOptions": {
|
|
3
|
-
"
|
|
4
|
-
"allowSyntheticDefaultImports": true,
|
|
5
|
-
"declaration": true,
|
|
6
|
-
"esModuleInterop": true,
|
|
7
|
-
"experimentalDecorators": true,
|
|
8
|
-
"forceConsistentCasingInFileNames": true,
|
|
9
|
-
"lib": [
|
|
10
|
-
"esnext"
|
|
11
|
-
],
|
|
12
|
-
"module": "esnext",
|
|
13
|
-
"moduleResolution": "node",
|
|
14
|
-
"noImplicitReturns": true,
|
|
15
|
-
"noUnusedLocals": false,
|
|
4
|
+
"rootDir": "src",
|
|
16
5
|
"outDir": "lib",
|
|
17
|
-
"preserveWatchOutput": true,
|
|
18
|
-
"skipLibCheck": true,
|
|
19
|
-
"sourceMap": true,
|
|
20
|
-
"target": "esnext",
|
|
21
|
-
"types": [
|
|
22
|
-
"node",
|
|
23
|
-
"jest"
|
|
24
|
-
]
|
|
25
6
|
},
|
|
7
|
+
"exclude": ["**/*.test.ts", "**/*.test.js", "tests"],
|
|
26
8
|
"include": [
|
|
27
|
-
"src"
|
|
9
|
+
"./src"
|
|
28
10
|
]
|
|
29
11
|
}
|