simple-log-methods 0.5.0 → 0.6.1
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/domain/LogTrail.d.ts +20 -0
- package/dist/domain/LogTrail.js +3 -0
- package/dist/domain/LogTrail.js.map +1 -0
- package/dist/domain/constants.js.map +1 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/{formatLogContentsForEnvironment.d.ts → logic/formatLogContentsForEnvironment.d.ts} +1 -1
- package/dist/{formatLogContentsForEnvironment.js → logic/formatLogContentsForEnvironment.js} +1 -1
- package/dist/logic/formatLogContentsForEnvironment.js.map +1 -0
- package/dist/{formatLogContentsForEnvironment.test.js → logic/formatLogContentsForEnvironment.test.js} +5 -5
- package/dist/logic/formatLogContentsForEnvironment.test.js.map +1 -0
- package/dist/{generateLogMethod.d.ts → logic/generateLogMethod.d.ts} +1 -1
- package/dist/{generateLogMethod.js → logic/generateLogMethod.js} +1 -1
- package/dist/logic/generateLogMethod.js.map +1 -0
- package/dist/{generateLogMethod.test.js → logic/generateLogMethod.test.js} +1 -1
- package/dist/logic/generateLogMethod.test.js.map +1 -0
- package/dist/{generateLogMethods.d.ts → logic/generateLogMethods.d.ts} +1 -1
- package/dist/{generateLogMethods.js → logic/generateLogMethods.js} +1 -1
- package/dist/logic/generateLogMethods.js.map +1 -0
- package/dist/logic/generateLogMethods.test.js.map +1 -0
- package/dist/{getRecommendedMinimalLogLevelForEnvironment.d.ts → logic/getRecommendedMinimalLogLevelForEnvironment.d.ts} +1 -1
- package/dist/{getRecommendedMinimalLogLevelForEnvironment.js → logic/getRecommendedMinimalLogLevelForEnvironment.js} +1 -1
- package/dist/logic/getRecommendedMinimalLogLevelForEnvironment.js.map +1 -0
- package/dist/{identifyEnvironment.d.ts → logic/identifyEnvironment.d.ts} +1 -1
- package/dist/{identifyEnvironment.js → logic/identifyEnvironment.js} +1 -1
- package/dist/logic/identifyEnvironment.js.map +1 -0
- package/dist/logic/withLogTrail.d.ts +46 -0
- package/dist/logic/withLogTrail.js +127 -0
- package/dist/logic/withLogTrail.js.map +1 -0
- package/license.md +21 -0
- package/package.json +5 -2
- package/dist/constants.js.map +0 -1
- package/dist/formatLogContentsForEnvironment.js.map +0 -1
- package/dist/formatLogContentsForEnvironment.test.js.map +0 -1
- package/dist/generateLogMethod.js.map +0 -1
- package/dist/generateLogMethod.test.js.map +0 -1
- package/dist/generateLogMethods.js.map +0 -1
- package/dist/generateLogMethods.test.js.map +0 -1
- package/dist/getRecommendedMinimalLogLevelForEnvironment.js.map +0 -1
- package/dist/identifyEnvironment.js.map +0 -1
- /package/dist/{constants.d.ts → domain/constants.d.ts} +0 -0
- /package/dist/{constants.js → domain/constants.js} +0 -0
- /package/dist/{formatLogContentsForEnvironment.test.d.ts → logic/formatLogContentsForEnvironment.test.d.ts} +0 -0
- /package/dist/{generateLogMethod.test.d.ts → logic/generateLogMethod.test.d.ts} +0 -0
- /package/dist/{generateLogMethods.test.d.ts → logic/generateLogMethods.test.d.ts} +0 -0
- /package/dist/{generateLogMethods.test.js → logic/generateLogMethods.test.js} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Procedure, ProcedureContext } from 'domain-glossary-procedure';
|
|
2
|
+
import { LogMethods } from '../logic/generateLogMethods';
|
|
3
|
+
/**
|
|
4
|
+
* .what = the procedure invocation trail
|
|
5
|
+
*/
|
|
6
|
+
export type LogTrail = string[];
|
|
7
|
+
export interface ContextLogTrail {
|
|
8
|
+
/**
|
|
9
|
+
* .what = the log context which can be used; methods, trail, etc
|
|
10
|
+
*/
|
|
11
|
+
log: LogMethods & {
|
|
12
|
+
_orig?: LogMethods;
|
|
13
|
+
} & {
|
|
14
|
+
/**
|
|
15
|
+
* .what = the log trail which has been collected
|
|
16
|
+
*/
|
|
17
|
+
trail?: LogTrail;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export type HasContextLogTrail<T extends Procedure> = ProcedureContext<T> extends ContextLogTrail ? T : never;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogTrail.js","sourceRoot":"","sources":["../../src/domain/LogTrail.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/domain/constants.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAE1C;;GAEG;AACH,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,2BAAe,CAAA;AACjB,CAAC,EALW,QAAQ,wBAAR,QAAQ,QAKnB;AACY,QAAA,YAAY,GAAG,IAAA,yBAAc,EAAC,QAAQ,CAAC,CAAC;AAErD;;GAEG;AACH,IAAY,oBAuBX;AAvBD,WAAY,oBAAoB;IAC9B;;;;;OAKG;IACH,uCAAe,CAAA;IAEf;;;;OAIG;IACH,iDAAyB,CAAA;IAEzB;;;;;OAKG;IACH,mDAA2B,CAAA;AAC7B,CAAC,EAvBW,oBAAoB,oCAApB,oBAAoB,QAuB/B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export { LogLevel } from './constants';
|
|
2
|
-
export { LogMethod } from './generateLogMethod';
|
|
3
|
-
export { generateLogMethods, LogMethods } from './generateLogMethods';
|
|
1
|
+
export { LogLevel } from './domain/constants';
|
|
2
|
+
export { LogMethod } from './logic/generateLogMethod';
|
|
3
|
+
export { generateLogMethods, LogMethods } from './logic/generateLogMethods';
|
|
4
|
+
export { ContextLogTrail, LogTrail, HasContextLogTrail, } from './domain/LogTrail';
|
|
5
|
+
export { withLogTrail } from './logic/withLogTrail';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateLogMethods = exports.LogLevel = void 0;
|
|
4
|
-
var constants_1 = require("./constants");
|
|
3
|
+
exports.withLogTrail = exports.generateLogMethods = exports.LogLevel = void 0;
|
|
4
|
+
var constants_1 = require("./domain/constants");
|
|
5
5
|
Object.defineProperty(exports, "LogLevel", { enumerable: true, get: function () { return constants_1.LogLevel; } });
|
|
6
|
-
var generateLogMethods_1 = require("./generateLogMethods");
|
|
6
|
+
var generateLogMethods_1 = require("./logic/generateLogMethods");
|
|
7
7
|
Object.defineProperty(exports, "generateLogMethods", { enumerable: true, get: function () { return generateLogMethods_1.generateLogMethods; } });
|
|
8
|
+
var withLogTrail_1 = require("./logic/withLogTrail");
|
|
9
|
+
Object.defineProperty(exports, "withLogTrail", { enumerable: true, get: function () { return withLogTrail_1.withLogTrail; } });
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,gDAA8C;AAArC,qGAAA,QAAQ,OAAA;AAEjB,iEAA4E;AAAnE,wHAAA,kBAAkB,OAAA;AAM3B,qDAAoD;AAA3C,4GAAA,YAAY,OAAA"}
|
package/dist/{formatLogContentsForEnvironment.js → logic/formatLogContentsForEnvironment.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.formatLogContentsForEnvironment = void 0;
|
|
4
|
-
const constants_1 = require("
|
|
4
|
+
const constants_1 = require("../domain/constants");
|
|
5
5
|
const identifyEnvironment_1 = require("./identifyEnvironment");
|
|
6
6
|
const formatLogContentsForEnvironment = ({ level, timestamp, message, metadata, }) => {
|
|
7
7
|
const env = (0, identifyEnvironment_1.identifyEnvironment)();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatLogContentsForEnvironment.js","sourceRoot":"","sources":["../../src/logic/formatLogContentsForEnvironment.ts"],"names":[],"mappings":";;;AAAA,mDAAqE;AACrE,+DAA4D;AAErD,MAAM,+BAA+B,GAAG,CAAC,EAC9C,KAAK,EACL,SAAS,EACT,OAAO,EACP,QAAQ,GAMT,EAAE,EAAE;IACH,MAAM,GAAG,GAAG,IAAA,yCAAmB,GAAE,CAAC;IAElC,0HAA0H;IAC1H,IAAI,GAAG,KAAK,gCAAoB,CAAC,KAAK,EAAE,CAAC;QACvC,OAAO;YACL,KAAK;YACL,SAAS;YACT,OAAO;YACP,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,mEAAmE;SACxG,CAAC;IACJ,CAAC;IAED,qKAAqK;IACrK,IAAI,GAAG,KAAK,gCAAoB,CAAC,UAAU,EAAE,CAAC;QAC5C,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,KAAK;YACL,SAAS;YACT,OAAO;YACP,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;IAED,wJAAwJ;IACxJ,IAAI,GAAG,KAAK,gCAAoB,CAAC,WAAW,EAAE,CAAC;QAC7C,OAAO;YACL,KAAK;YACL,SAAS;YACT,OAAO;YACP,QAAQ;SACT,CAAC;IACJ,CAAC;IAED,6EAA6E;IAC7E,MAAM,IAAI,KAAK,CACb,oGAAoG,CACrG,CAAC,CAAC,YAAY;AACjB,CAAC,CAAC;AA/CW,QAAA,+BAA+B,mCA+C1C"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const constants_1 = require("
|
|
3
|
+
const __1 = require("..");
|
|
4
|
+
const constants_1 = require("../domain/constants");
|
|
5
5
|
const formatLogContentsForEnvironment_1 = require("./formatLogContentsForEnvironment");
|
|
6
6
|
const identifyEnvironment_1 = require("./identifyEnvironment");
|
|
7
7
|
jest.mock('./identifyEnvironment');
|
|
@@ -11,7 +11,7 @@ describe('formatMetadataForEnvironment', () => {
|
|
|
11
11
|
identifyEnvironmentMock.mockReturnValue(constants_1.SupportedEnvironment.LOCAL);
|
|
12
12
|
const metadata = { name: 'bob', likes: ['oranges', 'apples'] };
|
|
13
13
|
const logContents = {
|
|
14
|
-
level:
|
|
14
|
+
level: __1.LogLevel.INFO,
|
|
15
15
|
timestamp: new Date().toISOString(),
|
|
16
16
|
message: 'hello world!',
|
|
17
17
|
metadata,
|
|
@@ -26,7 +26,7 @@ describe('formatMetadataForEnvironment', () => {
|
|
|
26
26
|
identifyEnvironmentMock.mockReturnValue(constants_1.SupportedEnvironment.AWS_LAMBDA);
|
|
27
27
|
const metadata = { name: 'bob', likes: ['oranges', 'apples'] };
|
|
28
28
|
const logContents = {
|
|
29
|
-
level:
|
|
29
|
+
level: __1.LogLevel.INFO,
|
|
30
30
|
timestamp: new Date().toISOString(),
|
|
31
31
|
message: 'hello world!',
|
|
32
32
|
metadata,
|
|
@@ -38,7 +38,7 @@ describe('formatMetadataForEnvironment', () => {
|
|
|
38
38
|
identifyEnvironmentMock.mockReturnValue(constants_1.SupportedEnvironment.WEB_BROWSER);
|
|
39
39
|
const metadata = { name: 'bob', likes: ['oranges', 'apples'] };
|
|
40
40
|
const logContents = {
|
|
41
|
-
level:
|
|
41
|
+
level: __1.LogLevel.INFO,
|
|
42
42
|
timestamp: new Date().toISOString(),
|
|
43
43
|
message: 'hello world!',
|
|
44
44
|
metadata,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatLogContentsForEnvironment.test.js","sourceRoot":"","sources":["../../src/logic/formatLogContentsForEnvironment.test.ts"],"names":[],"mappings":";;AAAA,0BAA8B;AAC9B,mDAA2D;AAC3D,uFAAoF;AACpF,+DAA4D;AAE5D,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;AACnC,MAAM,uBAAuB,GAAG,yCAAgC,CAAC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EAAE,CAAC,kFAAkF,EAAE,GAAG,EAAE;QAC1F,uBAAuB,CAAC,eAAe,CAAC,gCAAoB,CAAC,WAAW,CAAC,CAAC;QAC1E,MAAM,QAAQ,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,CAAC;QAC/D,MAAM,WAAW,GAAG;YAClB,KAAK,EAAE,YAAQ,CAAC,IAAI;YACpB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,OAAO,EAAE,cAAc;YACvB,QAAQ;SACT,CAAC;QACF,MAAM,SAAS,GAAG,IAAA,iEAA+B,EAAC,WAAW,CAAC,CAAC;QAC/D,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateLogMethod = void 0;
|
|
4
|
-
const constants_1 = require("
|
|
4
|
+
const constants_1 = require("../domain/constants");
|
|
5
5
|
const formatLogContentsForEnvironment_1 = require("./formatLogContentsForEnvironment");
|
|
6
6
|
/*
|
|
7
7
|
define priority order of log levels and make it easy to ask questions about
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateLogMethod.js","sourceRoot":"","sources":["../../src/logic/generateLogMethod.ts"],"names":[],"mappings":";;;AAAA,mDAA+C;AAC/C,uFAAoF;AAEpF;;EAEE;AACF,MAAM,qBAAqB,GAAG;IAC5B,oBAAQ,CAAC,KAAK;IACd,oBAAQ,CAAC,IAAI;IACb,oBAAQ,CAAC,IAAI;IACb,oBAAQ,CAAC,KAAK;CACf,CAAC;AACF,MAAM,4BAA4B,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAgC,EAAE,EAAE,CAC9E,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAUpE,MAAM,iBAAiB,GAAG,CAAC,EAChC,KAAK,EACL,eAAe,GAIhB,EAAE,EAAE;IACH,OAAO,CAAC,OAAe,EAAE,QAAiB,EAAE,EAAE;QAC5C,IAAI,4BAA4B,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,CAAC;YACnE,yFAAyF;YACzF,MAAM,aAAa,GAAG,4BAA4B,CAAC;gBACjD,CAAC,EAAE,KAAK;gBACR,CAAC,EAAE,oBAAQ,CAAC,IAAI;aACjB,CAAC;gBACA,CAAC,CAAC,OAAO,CAAC,IAAI;gBACd,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,iCAAiC;YAElD,wGAAwG;YACxG,aAAa,CACX,IAAA,iEAA+B,EAAC;gBAC9B,KAAK;gBACL,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACnC,OAAO;gBACP,QAAQ;aACT,CAAC,CACH,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC;AA5BW,QAAA,iBAAiB,qBA4B5B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const constants_1 = require("
|
|
3
|
+
const constants_1 = require("../domain/constants");
|
|
4
4
|
const generateLogMethod_1 = require("./generateLogMethod");
|
|
5
5
|
describe('generateLogMethod', () => {
|
|
6
6
|
beforeEach(() => jest.clearAllMocks());
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateLogMethod.test.js","sourceRoot":"","sources":["../../src/logic/generateLogMethod.test.ts"],"names":[],"mappings":";;AAAA,mDAA+C;AAC/C,2DAAwD;AAExD,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACj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G,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QACrC,MAAM,CAAC,GAAG,CAAC,CAAC,oBAAoB,CAC9B,MAAM,CAAC,gBAAgB,CAAC;YACtB,KAAK,EAAE,oBAAQ,CAAC,KAAK;YACrB,OAAO,EAAE,aAAa;YACtB,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC;SACvD,CAAC,CACH,CAAC;QACF,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAC9D,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACvC,MAAM,QAAQ,GAAG,IAAA,qCAAiB,EAAC;YACjC,KAAK,EAAE,oBAAQ,CAAC,KAAK;YACrB,eAAe,EAAE,oBAAQ,CAAC,IAAI;SAC/B,CAAC,CAAC;QACH,QAAQ,CAAC,aAAa,CAAC,CAAC;QACxB,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateLogMethods = void 0;
|
|
4
|
-
const constants_1 = require("
|
|
4
|
+
const constants_1 = require("../domain/constants");
|
|
5
5
|
const generateLogMethod_1 = require("./generateLogMethod");
|
|
6
6
|
const getRecommendedMinimalLogLevelForEnvironment_1 = require("./getRecommendedMinimalLogLevelForEnvironment");
|
|
7
7
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateLogMethods.js","sourceRoot":"","sources":["../../src/logic/generateLogMethods.ts"],"names":[],"mappings":";;;AAAA,mDAA+C;AAC/C,2DAAmE;AACnE,+GAA4G;AAgC5G;;;;GAIG;AACI,MAAM,kBAAkB,GAAG,CAAC,EACjC,eAAe,GAAG,IAAA,yFAA2C,GAAE,MAC7B,EAAE,EAAc,EAAE;IACpD,uBAAuB;IACvB,OAAO;QACL,KAAK,EAAE,IAAA,qCAAiB,EAAC,EAAE,KAAK,EAAE,oBAAQ,CAAC,KAAK,EAAE,eAAe,EAAE,CAAC;QACpE,IAAI,EAAE,IAAA,qCAAiB,EAAC,EAAE,KAAK,EAAE,oBAAQ,CAAC,IAAI,EAAE,eAAe,EAAE,CAAC;QAClE,IAAI,EAAE,IAAA,qCAAiB,EAAC,EAAE,KAAK,EAAE,oBAAQ,CAAC,IAAI,EAAE,eAAe,EAAE,CAAC;QAClE,KAAK,EAAE,IAAA,qCAAiB,EAAC,EAAE,KAAK,EAAE,oBAAQ,CAAC,KAAK,EAAE,eAAe,EAAE,CAAC;KACrE,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,kBAAkB,sBAU7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateLogMethods.test.js","sourceRoot":"","sources":["../../src/logic/generateLogMethods.test.ts"],"names":[],"mappings":";;AAAA,6DAA0D;AAE1D,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACvC,MAAM,GAAG,GAAG,IAAA,uCAAkB,GAAE,CAAC;QACjC,MAAM,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACpC,MAAM,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QACnC,MAAM,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QACnC,MAAM,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LogLevel } from '
|
|
1
|
+
import { LogLevel } from '../domain/constants';
|
|
2
2
|
export declare const getRecommendedMinimalLogLevelForEnvironment: () => LogLevel;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRecommendedMinimalLogLevelForEnvironment = void 0;
|
|
4
|
-
const constants_1 = require("
|
|
4
|
+
const constants_1 = require("../domain/constants");
|
|
5
5
|
const identifyEnvironment_1 = require("./identifyEnvironment");
|
|
6
6
|
const getLogLevelFromEnvVar = () => {
|
|
7
7
|
// if LOG_LEVEL was specified, use that
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getRecommendedMinimalLogLevelForEnvironment.js","sourceRoot":"","sources":["../../src/logic/getRecommendedMinimalLogLevelForEnvironment.ts"],"names":[],"mappings":";;;AAAA,mDAI6B;AAC7B,+DAA4D;AAE5D,MAAM,qBAAqB,GAAG,GAAoB,EAAE;IAClD,uCAAuC;IACvC,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,4BAA4B;IAClF,IAAI,cAAc,EAAE,CAAC;QACnB,oCAAoC;QACpC,IAAI,IAAA,wBAAY,EAAC,cAAc,CAAC;YAAE,OAAO,cAAc,CAAC;QAExD,wDAAwD;QACxD,OAAO,CAAC,IAAI,CACV,kEAAkE,cAAc,8BAA8B,CAC/G,CAAC;IACJ,CAAC;IAED,+EAA+E;IAC/E,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,IAAI,CAAC;IACrD,IAAI,cAAc,KAAK,MAAM;QAAE,OAAO,oBAAQ,CAAC,KAAK,CAAC;IAErD,uDAAuD;IAEvD,kBAAkB;IAClB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEK,MAAM,2CAA2C,GAAG,GAAa,EAAE;IACxE,0EAA0E;IAC1E,MAAM,kBAAkB,GAAG,qBAAqB,EAAE,CAAC;IACnD,IAAI,kBAAkB;QAAE,OAAO,kBAAkB,CAAC;IAElD,4BAA4B;IAC5B,MAAM,GAAG,GAAG,IAAA,yCAAmB,GAAE,CAAC;IAElC,sIAAsI;IACtI,IAAI,GAAG,KAAK,gCAAoB,CAAC,UAAU;QAAE,OAAO,oBAAQ,CAAC,KAAK,CAAC;IAEnE,4DAA4D;IAC5D,OAAO,oBAAQ,CAAC,IAAI,CAAC;AACvB,CAAC,CAAC;AAbW,QAAA,2CAA2C,+CAatD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SupportedEnvironment } from '
|
|
1
|
+
import { SupportedEnvironment } from '../domain/constants';
|
|
2
2
|
/**
|
|
3
3
|
* identifies the supported environment that this is being run in, as best as possible
|
|
4
4
|
* - defaults to LOCAL environment, as it has the most common settings and is not distinguishable otherwise
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.identifyEnvironment = void 0;
|
|
4
|
-
const constants_1 = require("
|
|
4
|
+
const constants_1 = require("../domain/constants");
|
|
5
5
|
/**
|
|
6
6
|
* identifies the supported environment that this is being run in, as best as possible
|
|
7
7
|
* - defaults to LOCAL environment, as it has the most common settings and is not distinguishable otherwise
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identifyEnvironment.js","sourceRoot":"","sources":["../../src/logic/identifyEnvironment.ts"],"names":[],"mappings":";;;AAAA,mDAA2D;AAE3D;;;GAGG;AACI,MAAM,mBAAmB,GAAG,GAAyB,EAAE;IAC5D,iDAAiD;IACjD,MAAM,sBAAsB,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC,sDAAsD;IAC7H,IAAI,sBAAsB;QAAE,OAAO,gCAAoB,CAAC,UAAU,CAAC;IAEnE,qCAAqC;IACrC,MAAM,uBAAuB,GAC3B,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW,CAAC,CAAC,0CAA0C;IACrH,IAAI,uBAAuB;QAAE,OAAO,gCAAoB,CAAC,WAAW,CAAC;IAErE,uBAAuB;IACvB,OAAO,gCAAoB,CAAC,KAAK,CAAC;AACpC,CAAC,CAAC;AAZW,QAAA,mBAAmB,uBAY9B"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { UniDuration } from '@ehmpathy/uni-time';
|
|
2
|
+
import { ContextLogTrail } from '../domain/LogTrail';
|
|
3
|
+
import { LogLevel } from '../domain/constants';
|
|
4
|
+
/**
|
|
5
|
+
* enables input output logging and tracing for a method
|
|
6
|
+
*
|
|
7
|
+
* todo: - add tracing identifier w/ async-context
|
|
8
|
+
* todo: - hookup visual tracing w/ external lib (vi...lo...)
|
|
9
|
+
* todo: - bundle this with its own logging library which supports scoped logs
|
|
10
|
+
*/
|
|
11
|
+
export declare const withLogTrail: <TInput, TContext extends ContextLogTrail, TOutput>(logic: (input: TInput, context: TContext) => TOutput, { name: declaredName, log: logOptions, duration, }: {
|
|
12
|
+
/**
|
|
13
|
+
* specifies the name of the function, if the function does not have a name assigned already
|
|
14
|
+
*/
|
|
15
|
+
name?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* enable redacting parts of the input or output from logging
|
|
18
|
+
*/
|
|
19
|
+
log?: {
|
|
20
|
+
/**
|
|
21
|
+
* specifies the level to log the trail with
|
|
22
|
+
*
|
|
23
|
+
* note:
|
|
24
|
+
* - defaults to .debug // todo: debug to .trail
|
|
25
|
+
*/
|
|
26
|
+
level?: LogLevel | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* what of the input to log
|
|
29
|
+
*/
|
|
30
|
+
input?: ((input: TInput, context: TContext) => any) | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* what of the output to log
|
|
33
|
+
*/
|
|
34
|
+
output?: ((value: Awaited<TOutput>) => any) | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* what of the error to log
|
|
37
|
+
*/
|
|
38
|
+
error?: ((error: Error) => any) | undefined;
|
|
39
|
+
} | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* specifies the threshold after which a duration will be included on the output log
|
|
42
|
+
*/
|
|
43
|
+
duration?: {
|
|
44
|
+
threshold: UniDuration;
|
|
45
|
+
} | undefined;
|
|
46
|
+
}) => (input: TInput, context: TContext) => TOutput;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withLogTrail = void 0;
|
|
4
|
+
const error_fns_1 = require("@ehmpathy/error-fns");
|
|
5
|
+
const uni_time_1 = require("@ehmpathy/uni-time");
|
|
6
|
+
const type_fns_1 = require("type-fns");
|
|
7
|
+
const noOp = (...input) => input;
|
|
8
|
+
const omitContext = (...input) => input[0]; // standard pattern for args = [input, context]
|
|
9
|
+
const pickErrorMessage = (input) => ({
|
|
10
|
+
error: { message: input.message },
|
|
11
|
+
});
|
|
12
|
+
const roundToHundredths = (num) => Math.round(num * 100) / 100; // https://stackoverflow.com/a/14968691/3068233
|
|
13
|
+
const DEFAULT_DURATION_REPORT_THRESHOLD = process.env
|
|
14
|
+
.VISUALOGIC_DURATION_THRESHOLD
|
|
15
|
+
? parseInt(process.env.VISUALOGIC_DURATION_THRESHOLD)
|
|
16
|
+
: (0, uni_time_1.toMilliseconds)({ seconds: 1 });
|
|
17
|
+
/**
|
|
18
|
+
* enables input output logging and tracing for a method
|
|
19
|
+
*
|
|
20
|
+
* todo: - add tracing identifier w/ async-context
|
|
21
|
+
* todo: - hookup visual tracing w/ external lib (vi...lo...)
|
|
22
|
+
* todo: - bundle this with its own logging library which supports scoped logs
|
|
23
|
+
*/
|
|
24
|
+
const withLogTrail = (logic, { name: declaredName, log: logOptions, duration = {
|
|
25
|
+
threshold: { milliseconds: DEFAULT_DURATION_REPORT_THRESHOLD },
|
|
26
|
+
}, }) => {
|
|
27
|
+
// cache the name of the function per wrapping
|
|
28
|
+
const name = logic.name || declaredName || null; // use `\\` since `logic.name` returns `""` for anonymous functions
|
|
29
|
+
// if no name is identifiable, throw an error here to fail fast
|
|
30
|
+
if (!name)
|
|
31
|
+
throw new error_fns_1.UnexpectedCodePathError('could not identify name for wrapped function');
|
|
32
|
+
// if the name specified does not match the name of the function, throw an error here to fail fast
|
|
33
|
+
if (declaredName && name !== declaredName)
|
|
34
|
+
throw new error_fns_1.UnexpectedCodePathError('the natural name of the function is different than the declared name', { declaredName, naturalName: name });
|
|
35
|
+
// extract the log methods
|
|
36
|
+
const logTrailLevel = logOptions?.level ?? 'debug';
|
|
37
|
+
const logInputMethod = logOptions?.input ?? omitContext;
|
|
38
|
+
const logOutputMethod = logOptions?.output ?? noOp;
|
|
39
|
+
const logErrorMethod = logOptions?.error ?? pickErrorMessage;
|
|
40
|
+
// define the duration threshold
|
|
41
|
+
const durationReportingThreshold = duration.threshold;
|
|
42
|
+
const durationReportingThresholdInSeconds = (0, uni_time_1.toMilliseconds)(durationReportingThreshold) / 1000;
|
|
43
|
+
// wrap the function
|
|
44
|
+
return (input, context) => {
|
|
45
|
+
// now log the input
|
|
46
|
+
context.log.debug(`${name}.input`, {
|
|
47
|
+
input: logInputMethod(input, context),
|
|
48
|
+
});
|
|
49
|
+
// begin tracking duration
|
|
50
|
+
const startTimeInMilliseconds = new Date().getTime();
|
|
51
|
+
// define the context.log method that will be given to the logic
|
|
52
|
+
const logMethodsWithContext = {
|
|
53
|
+
// add the trail
|
|
54
|
+
trail: [...(context.log.trail ?? []), name],
|
|
55
|
+
// track the orig logger
|
|
56
|
+
_orig: context.log?._orig ?? context.log,
|
|
57
|
+
// add the scoped methods
|
|
58
|
+
debug: (message, metadata) => context.log.debug(`${name}.progress: ${message}`, metadata),
|
|
59
|
+
info: (message, metadata) => context.log.info(`${name}.progress: ${message}`, metadata),
|
|
60
|
+
warn: (message, metadata) => context.log.warn(`${name}.progress: ${message}`, metadata),
|
|
61
|
+
error: (message, metadata) => context.log.error(`${name}.progress: ${message}`, metadata),
|
|
62
|
+
};
|
|
63
|
+
// now execute the method
|
|
64
|
+
const result = logic(input, {
|
|
65
|
+
...context,
|
|
66
|
+
log: logMethodsWithContext,
|
|
67
|
+
});
|
|
68
|
+
// if the result was a promise, log when that method crosses the reporting threshold, to identify which procedures are slow
|
|
69
|
+
if ((0, type_fns_1.isAPromise)(result)) {
|
|
70
|
+
// define how to log the breach, on breach
|
|
71
|
+
const onDurationBreach = () => context.log[logTrailLevel](`${name}.duration.breach`, {
|
|
72
|
+
input: logInputMethod(input, context),
|
|
73
|
+
already: { duration: `${durationReportingThresholdInSeconds} sec` },
|
|
74
|
+
});
|
|
75
|
+
// define a timeout which will trigger on duration threshold
|
|
76
|
+
const onBreachTrigger = setTimeout(onDurationBreach, durationReportingThresholdInSeconds * 1000);
|
|
77
|
+
// remove the timeout when the operation completes, to prevent logging if completes before duration
|
|
78
|
+
void result
|
|
79
|
+
.finally(() => clearTimeout(onBreachTrigger))
|
|
80
|
+
.catch(() => {
|
|
81
|
+
// do nothing when there's an error; just catch it, to ensure it doesn't get propagated further as an uncaught exception
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
// define what to do when we have output
|
|
85
|
+
const logOutput = (output) => {
|
|
86
|
+
const endTimeInMilliseconds = new Date().getTime();
|
|
87
|
+
const durationInMilliseconds = endTimeInMilliseconds - startTimeInMilliseconds;
|
|
88
|
+
const durationInSeconds = roundToHundredths(durationInMilliseconds / 1e3); // https://stackoverflow.com/a/53970656/3068233
|
|
89
|
+
context.log[logTrailLevel](`${name}.output`, {
|
|
90
|
+
input: logInputMethod(input, context),
|
|
91
|
+
output: logOutputMethod(output),
|
|
92
|
+
...(durationInSeconds >= durationReportingThresholdInSeconds
|
|
93
|
+
? { duration: `${durationInSeconds} sec` } // only include the duration if the threshold was crossed
|
|
94
|
+
: {}),
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
// define what to do when we have an error
|
|
98
|
+
const logError = (error) => {
|
|
99
|
+
const endTimeInMilliseconds = new Date().getTime();
|
|
100
|
+
const durationInMilliseconds = endTimeInMilliseconds - startTimeInMilliseconds;
|
|
101
|
+
const durationInSeconds = roundToHundredths(durationInMilliseconds / 1e3); // https://stackoverflow.com/a/53970656/3068233
|
|
102
|
+
context.log[logTrailLevel](`${name}.error`, {
|
|
103
|
+
input: logInputMethod(input, context),
|
|
104
|
+
output: logErrorMethod(error),
|
|
105
|
+
...(durationInSeconds >= durationReportingThresholdInSeconds
|
|
106
|
+
? { duration: `${durationInSeconds} sec` } // only include the duration if the threshold was crossed
|
|
107
|
+
: {}),
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
// if result is a promise, ensure we log after the output resolves
|
|
111
|
+
if ((0, type_fns_1.isAPromise)(result))
|
|
112
|
+
return result
|
|
113
|
+
.then((output) => {
|
|
114
|
+
logOutput(output);
|
|
115
|
+
return output;
|
|
116
|
+
})
|
|
117
|
+
.catch((error) => {
|
|
118
|
+
logError(error);
|
|
119
|
+
throw error;
|
|
120
|
+
});
|
|
121
|
+
// otherwise, its not a promise, so its done, so log now and return the result
|
|
122
|
+
logOutput(result);
|
|
123
|
+
return result;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
exports.withLogTrail = withLogTrail;
|
|
127
|
+
//# sourceMappingURL=withLogTrail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withLogTrail.js","sourceRoot":"","sources":["../../src/logic/withLogTrail.ts"],"names":[],"mappings":";;;AAAA,mDAA8D;AAC9D,iDAAiE;AAMjE,uCAAkD;AAOlD,MAAM,IAAI,GAAG,CAAC,GAAG,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC;AACtC,MAAM,WAAW,GAAG,CAAC,GAAG,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AC,CAAC,KAAY,EAAE,EAAE;gBACtB,QAAQ,CAAC,KAAK,CAAC,CAAC;gBAChB,MAAM,KAAK,CAAC;YACd,CAAC,CAAY,CAAC;QAElB,8EAA8E;QAC9E,SAAS,CAAC,MAAgD,CAAC,CAAC;QAC5D,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC,CAAC;AAlMW,QAAA,YAAY,gBAkMvB"}
|
package/license.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 ehmpathy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "simple-log-methods",
|
|
3
3
|
"author": "ehmpathy",
|
|
4
4
|
"description": "a simple and opinionated logging library. plays well with aws lambda + cloudwatch.",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.6.1",
|
|
6
6
|
"repository": "ehmpathy/simple-log-methods",
|
|
7
7
|
"homepage": "https://github.com/ehmpathy/simple-log-methods",
|
|
8
8
|
"keywords": [
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
"prepare:husky": "npx husky install && chmod ug+x .husky/*"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
+
"@ehmpathy/error-fns": "^1.3.7",
|
|
58
|
+
"@ehmpathy/uni-time": "^1.7.4",
|
|
59
|
+
"domain-glossary-procedure": "^1.0.0",
|
|
57
60
|
"type-fns": "^1.16.0"
|
|
58
61
|
},
|
|
59
62
|
"devDependencies": {
|
|
@@ -67,7 +70,7 @@
|
|
|
67
70
|
"core-js": "3.26.1",
|
|
68
71
|
"cz-conventional-changelog": "3.3.0",
|
|
69
72
|
"declapract": "^0.12.0",
|
|
70
|
-
"declapract-typescript-ehmpathy": "^0.39.
|
|
73
|
+
"declapract-typescript-ehmpathy": "^0.39.7",
|
|
71
74
|
"depcheck": "1.4.3",
|
|
72
75
|
"eslint": "8.56.0",
|
|
73
76
|
"eslint-config-airbnb-typescript": "18.0.0",
|
package/dist/constants.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAE1C;;GAEG;AACH,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,2BAAe,CAAA;AACjB,CAAC,EALW,QAAQ,wBAAR,QAAQ,QAKnB;AACY,QAAA,YAAY,GAAG,IAAA,yBAAc,EAAC,QAAQ,CAAC,CAAC;AAErD;;GAEG;AACH,IAAY,oBAuBX;AAvBD,WAAY,oBAAoB;IAC9B;;;;;OAKG;IACH,uCAAe,CAAA;IAEf;;;;OAIG;IACH,iDAAyB,CAAA;IAEzB;;;;;OAKG;IACH,mDAA2B,CAAA;AAC7B,CAAC,EAvBW,oBAAoB,oCAApB,oBAAoB,QAuB/B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatLogContentsForEnvironment.js","sourceRoot":"","sources":["../src/formatLogContentsForEnvironment.ts"],"names":[],"mappings":";;;AAAA,2CAA6D;AAC7D,+DAA4D;AAErD,MAAM,+BAA+B,GAAG,CAAC,EAC9C,KAAK,EACL,SAAS,EACT,OAAO,EACP,QAAQ,GAMT,EAAE,EAAE;IACH,MAAM,GAAG,GAAG,IAAA,yCAAmB,GAAE,CAAC;IAElC,0HAA0H;IAC1H,IAAI,GAAG,KAAK,gCAAoB,CAAC,KAAK,EAAE,CAAC;QACvC,OAAO;YACL,KAAK;YACL,SAAS;YACT,OAAO;YACP,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,mEAAmE;SACxG,CAAC;IACJ,CAAC;IAED,qKAAqK;IACrK,IAAI,GAAG,KAAK,gCAAoB,CAAC,UAAU,EAAE,CAAC;QAC5C,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,KAAK;YACL,SAAS;YACT,OAAO;YACP,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;IAED,wJAAwJ;IACxJ,IAAI,GAAG,KAAK,gCAAoB,CAAC,WAAW,EAAE,CAAC;QAC7C,OAAO;YACL,KAAK;YACL,SAAS;YACT,OAAO;YACP,QAAQ;SACT,CAAC;IACJ,CAAC;IAED,6EAA6E;IAC7E,MAAM,IAAI,KAAK,CACb,oGAAoG,CACrG,CAAC,CAAC,YAAY;AACjB,CAAC,CAAC;AA/CW,QAAA,+BAA+B,mCA+C1C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatLogContentsForEnvironment.test.js","sourceRoot":"","sources":["../src/format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;AACJ,CAAC,CAAC;AAVW,QAAA,kBAAkB,sBAU7B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generateLogMethods.test.js","sourceRoot":"","sources":["../src/generateLogMethods.test.ts"],"names":[],"mappings":";;AAAA,6DAA0D;AAE1D,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACvC,MAAM,GAAG,GAAG,IAAA,uCAAkB,GAAE,CAAC;QACjC,MAAM,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACpC,MAAM,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QACnC,MAAM,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QACnC,MAAM,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getRecommendedMinimalLogLevelForEnvironment.js","sourceRoot":"","sources":["../src/getRecommendedMinimalLogLevelForEnvironment.ts"],"names":[],"mappings":";;;AAAA,2CAA2E;AAC3E,+DAA4D;AAE5D,MAAM,qBAAqB,GAAG,GAAoB,EAAE;IAClD,uCAAuC;IACvC,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,4BAA4B;IAClF,IAAI,cAAc,EAAE,CAAC;QACnB,oCAAoC;QACpC,IAAI,IAAA,wBAAY,EAAC,cAAc,CAAC;YAAE,OAAO,cAAc,CAAC;QAExD,wDAAwD;QACxD,OAAO,CAAC,IAAI,CACV,kEAAkE,cAAc,8BAA8B,CAC/G,CAAC;IACJ,CAAC;IAED,+EAA+E;IAC/E,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,IAAI,CAAC;IACrD,IAAI,cAAc,KAAK,MAAM;QAAE,OAAO,oBAAQ,CAAC,KAAK,CAAC;IAErD,uDAAuD;IAEvD,kBAAkB;IAClB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEK,MAAM,2CAA2C,GAAG,GAAa,EAAE;IACxE,0EAA0E;IAC1E,MAAM,kBAAkB,GAAG,qBAAqB,EAAE,CAAC;IACnD,IAAI,kBAAkB;QAAE,OAAO,kBAAkB,CAAC;IAElD,4BAA4B;IAC5B,MAAM,GAAG,GAAG,IAAA,yCAAmB,GAAE,CAAC;IAElC,sIAAsI;IACtI,IAAI,GAAG,KAAK,gCAAoB,CAAC,UAAU;QAAE,OAAO,oBAAQ,CAAC,KAAK,CAAC;IAEnE,4DAA4D;IAC5D,OAAO,oBAAQ,CAAC,IAAI,CAAC;AACvB,CAAC,CAAC;AAbW,QAAA,2CAA2C,+CAatD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"identifyEnvironment.js","sourceRoot":"","sources":["../src/identifyEnvironment.ts"],"names":[],"mappings":";;;AAAA,2CAAmD;AAEnD;;;GAGG;AACI,MAAM,mBAAmB,GAAG,GAAyB,EAAE;IAC5D,iDAAiD;IACjD,MAAM,sBAAsB,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC,sDAAsD;IAC7H,IAAI,sBAAsB;QAAE,OAAO,gCAAoB,CAAC,UAAU,CAAC;IAEnE,qCAAqC;IACrC,MAAM,uBAAuB,GAC3B,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW,CAAC,CAAC,0CAA0C;IACrH,IAAI,uBAAuB;QAAE,OAAO,gCAAoB,CAAC,WAAW,CAAC;IAErE,uBAAuB;IACvB,OAAO,gCAAoB,CAAC,KAAK,CAAC;AACpC,CAAC,CAAC;AAZW,QAAA,mBAAmB,uBAY9B"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|