@push.rocks/smartlog 3.0.2 → 3.0.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_bundle/bundle.js +2 -2
- package/dist_bundle/bundle.js.map +3 -3
- package/dist_ts/00_commitinfo_data.js +3 -3
- package/dist_ts/smartlog.classes.logrouter.d.ts +3 -3
- package/dist_ts/smartlog.classes.logrouter.js +1 -2
- package/dist_ts/smartlog.plugins.d.ts +2 -2
- package/dist_ts/smartlog.plugins.js +3 -3
- package/npmextra.json +2 -2
- package/package.json +5 -5
- package/ts/00_commitinfo_data.ts +2 -2
- package/ts/smartlog.classes.logrouter.ts +3 -5
- package/ts/smartlog.plugins.ts +2 -2
package/dist_bundle/bundle.js
CHANGED
|
@@ -20,9 +20,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
20
20
|
mod
|
|
21
21
|
));
|
|
22
22
|
|
|
23
|
-
// node_modules/.pnpm/@
|
|
23
|
+
// node_modules/.pnpm/@push.rocks+isounique@1.0.5/node_modules/@push.rocks/isounique/dist_ts/index.js
|
|
24
24
|
var require_dist_ts = __commonJS({
|
|
25
|
-
"node_modules/.pnpm/@
|
|
25
|
+
"node_modules/.pnpm/@push.rocks+isounique@1.0.5/node_modules/@push.rocks/isounique/dist_ts/index.js"(exports) {
|
|
26
26
|
"use strict";
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
exports.uni = void 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../node_modules/.pnpm/@
|
|
4
|
-
"sourcesContent": [null, "import * as isounique from '@
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,QAAM,MAAM,CAAC,SAAiB,UAAS;AAC5C,aAAO,GAAG,UAAU,2BAA2B,QAAQ,SAAS,CAAC,MAAK;AACpE,cAAM,IAAK,KAAK,OAAM,IAAK,KAAM;AACjC,cAAM,IAAI,MAAM,MAAM,IAAK,IAAI,IAAO;AACtC,eAAO,EAAE,SAAS,EAAE;MACtB,CAAC;IACH;AANa,YAAA,MAAG;;;;;ACAhB,gBAA2B;;;ACKpB,IAAM,aAAN,MAAiB;AAAA,EACf,IACL,aACA,eACA,SACA,gBACA;AACA,YAAQ,IAAI,OAAO,gBAAgB,eAAe;AAAA,EACpD;AACF;;;
|
|
3
|
+
"sources": ["../node_modules/.pnpm/@push.rocks+isounique@1.0.5/node_modules/@push.rocks/isounique/ts/index.ts", "../ts/smartlog.plugins.ts", "../ts/smartlog.classes.consolelog.ts", "../ts/smartlog.classes.logrouter.ts", "../ts/smartlog.classes.smartlog.ts", "../ts/smartlog.classes.loggroup.ts"],
|
|
4
|
+
"sourcesContent": [null, "import * as isounique from '@push.rocks/isounique';\nimport * as smartlogInterfaces from '@push.rocks/smartlog-interfaces';\n\nexport { isounique, smartlogInterfaces };\n", "import * as plugins from './smartlog.plugins.js';\n\n/**\n * a console log optimized for smartlog\n */\nexport class ConsoleLog {\n public log(\n logLevelArg: plugins.smartlogInterfaces.TLogLevel,\n logMessageArg: string,\n dataArg?: any,\n correlationArg?: plugins.smartlogInterfaces.ILogCorrelation\n ) {\n console.log(`__# ${logLevelArg}: ${logMessageArg}`);\n }\n}\n", "import * as plugins from './smartlog.plugins.js';\n\nexport class LogRouter {\n /**\n * all log destinations\n */\n private logDestinations: plugins.smartlogInterfaces.ILogDestination[] = [];\n\n constructor() {}\n\n public addLogDestination(logDestination: plugins.smartlogInterfaces.ILogDestination) {\n this.logDestinations.push(logDestination);\n }\n\n // routes the log according to added logDestinations\n public async routeLog(logPackageArg: plugins.smartlogInterfaces.ILogPackage) {\n for (const logDestination of this.logDestinations) {\n await logDestination.handleLog(logPackageArg);\n }\n }\n}\n", "import * as plugins from './smartlog.plugins.js';\n\nimport { LogRouter } from './smartlog.classes.logrouter.js';\nimport { LogGroup } from './smartlog.classes.loggroup.js';\n\nexport interface ISmartlogContructorOptions {\n logContext: plugins.smartlogInterfaces.ILogContext;\n minimumLogLevel?: plugins.smartlogInterfaces.TLogLevel;\n}\n\nexport class Smartlog implements plugins.smartlogInterfaces.ILogDestination {\n public logContext: plugins.smartlogInterfaces.ILogContext;\n public minimumLogLevel: plugins.smartlogInterfaces.TLogLevel;\n\n public uniInstanceId: string = plugins.isounique.uni();\n\n private consoleEnabled: boolean;\n\n private logRouter = new LogRouter();\n\n public addLogDestination(logDestinationArg: plugins.smartlogInterfaces.ILogDestination) {\n this.logRouter.addLogDestination(logDestinationArg);\n }\n\n constructor(optionsArg: ISmartlogContructorOptions) {\n this.logContext = optionsArg.logContext;\n this.minimumLogLevel = optionsArg.minimumLogLevel || 'silly';\n }\n\n // ============\n // Logger Setup\n // ============\n\n /**\n * enables console logging\n */\n public enableConsole(optionsArg?: { captureAll: boolean }) {\n if (globalThis.process && optionsArg && optionsArg.captureAll) {\n const process = globalThis.process;\n const write = process.stdout.write;\n process.stdout.write = (...args: any) => {\n const logString: string = args[0];\n if (!logString || typeof logString.startsWith !== 'function') {\n // lets continue as planned\n } else if (!logString.startsWith('LOG') && typeof logString === 'string') {\n switch (true) {\n case logString.substr(0, 20).includes('Error:'):\n this.log('error', logString);\n break;\n default:\n this.log('info', logString);\n }\n return true;\n }\n // fileStream.write(args[0]);\n write.apply(process.stdout, args);\n return true;\n };\n\n process.stderr.write = (...args: any) => {\n if (!args[0].startsWith('LOG')) {\n this.log('error', args[0]);\n return true;\n }\n // fileStream.write(args[0]);\n write.apply(process.stderr, args);\n return true;\n };\n }\n this.consoleEnabled = true;\n }\n\n // =============\n // log functions\n // =============\n /**\n * main log method\n * @param logLevelArg - the log level\n * @param logMessageArg - the log message\n * @param logDataArg - any additional log data\n * @param correlationArg - info about corrleations\n */\n public async log(\n logLevelArg: plugins.smartlogInterfaces.TLogLevel,\n logMessageArg: string,\n logDataArg?: any,\n correlationArg?: plugins.smartlogInterfaces.ILogCorrelation\n ) {\n correlationArg = {\n ...{\n id: plugins.isounique.uni(),\n type: 'none',\n instance: this.uniInstanceId,\n },\n ...correlationArg,\n };\n\n if (this.consoleEnabled) {\n this.safeConsoleLog(`${logLevelArg}: ${logMessageArg}`);\n }\n\n const logPackage: plugins.smartlogInterfaces.ILogPackage = {\n timestamp: Date.now(),\n type: 'log',\n context: this.logContext,\n level: logLevelArg,\n correlation: correlationArg,\n message: logMessageArg,\n };\n if (logDataArg) {\n logPackage.data = logDataArg;\n }\n await this.logRouter.routeLog(logPackage);\n }\n\n public increment(\n logLevelArg: plugins.smartlogInterfaces.TLogLevel,\n logMessageArg: string,\n logDataArg?: any,\n correlationArg: plugins.smartlogInterfaces.ILogCorrelation = {\n id: plugins.isounique.uni(),\n type: 'none',\n }\n ) {\n if (this.consoleEnabled) {\n this.safeConsoleLog(`INCREMENT: ${logLevelArg}: ${logMessageArg}`);\n }\n this.logRouter.routeLog({\n timestamp: Date.now(),\n type: 'increment',\n context: this.logContext,\n level: logLevelArg,\n message: logMessageArg,\n correlation: correlationArg,\n });\n }\n\n public async handleLog(logPackageArg: plugins.smartlogInterfaces.ILogPackage) {\n await this.logRouter.routeLog(logPackageArg);\n }\n\n private safeConsoleLog(logLine: string) {\n console.log(\n `LOG => ${new Date().getHours()}:${new Date().getMinutes()}:${new Date().getSeconds()} => ${logLine}`\n );\n }\n\n public createLogGroup(transactionId: string = 'none') {\n return new LogGroup(this, transactionId);\n }\n}\n", "import * as plugins from './smartlog.plugins.js';\nimport { Smartlog } from './smartlog.classes.smartlog.js';\n\nexport class LogGroup {\n public smartlogRef: Smartlog;\n public transactionId: string;\n public groupId = plugins.isounique.uni();\n\n constructor(smartlogInstance: Smartlog, transactionIdArg: string) {\n this.smartlogRef = smartlogInstance;\n this.transactionId = transactionIdArg;\n }\n\n public log(\n logLevelArg: plugins.smartlogInterfaces.TLogLevel,\n logMessageArg: string,\n logDataArg?: any\n ) {\n this.smartlogRef.log(logLevelArg, logMessageArg, logDataArg, {\n id: plugins.isounique.uni(),\n type: 'none',\n group: this.groupId,\n instance: this.smartlogRef.uniInstanceId,\n transaction: this.transactionId,\n });\n }\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* autocreated commitinfo by @pushrocks/commitinfo
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
|
-
name: '@
|
|
6
|
-
version: '3.0.
|
|
5
|
+
name: '@push.rocks/smartlog',
|
|
6
|
+
version: '3.0.3',
|
|
7
7
|
description: 'minimalistic distributed and extensible logging tool'
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSxzQkFBc0I7SUFDNUIsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHNEQUFzRDtDQUNwRSxDQUFBIn0=
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as plugins from './smartlog.plugins.js';
|
|
2
2
|
export declare class LogRouter {
|
|
3
3
|
/**
|
|
4
4
|
* all log destinations
|
|
5
5
|
*/
|
|
6
6
|
private logDestinations;
|
|
7
7
|
constructor();
|
|
8
|
-
addLogDestination(logDestination: ILogDestination): void;
|
|
9
|
-
routeLog(logPackageArg: ILogPackage): Promise<void>;
|
|
8
|
+
addLogDestination(logDestination: plugins.smartlogInterfaces.ILogDestination): void;
|
|
9
|
+
routeLog(logPackageArg: plugins.smartlogInterfaces.ILogPackage): Promise<void>;
|
|
10
10
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import './smartlog.plugins.js';
|
|
2
|
-
import '@pushrocks/smartlog-interfaces';
|
|
3
2
|
export class LogRouter {
|
|
4
3
|
constructor() {
|
|
5
4
|
/**
|
|
@@ -17,4 +16,4 @@ export class LogRouter {
|
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
18
|
}
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRsb2cuY2xhc3Nlcy5sb2dyb3V0ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydGxvZy5jbGFzc2VzLmxvZ3JvdXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUF5Qix1QkFBdUIsQ0FBQztBQUVqRCxNQUFNLE9BQU8sU0FBUztJQU1wQjtRQUxBOztXQUVHO1FBQ0ssb0JBQWUsR0FBaUQsRUFBRSxDQUFDO0lBRTVELENBQUM7SUFFVCxpQkFBaUIsQ0FBQyxjQUEwRDtRQUNqRixJQUFJLENBQUMsZUFBZSxDQUFDLElBQUksQ0FBQyxjQUFjLENBQUMsQ0FBQztJQUM1QyxDQUFDO0lBRUQsb0RBQW9EO0lBQzdDLEtBQUssQ0FBQyxRQUFRLENBQUMsYUFBcUQ7UUFDekUsS0FBSyxNQUFNLGNBQWMsSUFBSSxJQUFJLENBQUMsZUFBZSxFQUFFO1lBQ2pELE1BQU0sY0FBYyxDQUFDLFNBQVMsQ0FBQyxhQUFhLENBQUMsQ0FBQztTQUMvQztJQUNILENBQUM7Q0FDRiJ9
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import * as isounique from '@
|
|
2
|
-
import * as smartlogInterfaces from '@
|
|
1
|
+
import * as isounique from '@push.rocks/isounique';
|
|
2
|
+
import * as smartlogInterfaces from '@push.rocks/smartlog-interfaces';
|
|
3
3
|
export { isounique, smartlogInterfaces };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as isounique from '@
|
|
2
|
-
import * as smartlogInterfaces from '@
|
|
1
|
+
import * as isounique from '@push.rocks/isounique';
|
|
2
|
+
import * as smartlogInterfaces from '@push.rocks/smartlog-interfaces';
|
|
3
3
|
export { isounique, smartlogInterfaces };
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRsb2cucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0bG9nLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLFNBQVMsTUFBTSx1QkFBdUIsQ0FBQztBQUNuRCxPQUFPLEtBQUssa0JBQWtCLE1BQU0saUNBQWlDLENBQUM7QUFFdEUsT0FBTyxFQUFFLFNBQVMsRUFBRSxrQkFBa0IsRUFBRSxDQUFDIn0=
|
package/npmextra.json
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
"projectType": "npm",
|
|
4
4
|
"module": {
|
|
5
5
|
"githost": "gitlab.com",
|
|
6
|
-
"gitscope": "
|
|
6
|
+
"gitscope": "push.rocks",
|
|
7
7
|
"gitrepo": "smartlog",
|
|
8
8
|
"description": "minimalistic distributed and extensible logging tool",
|
|
9
|
-
"npmPackagename": "@
|
|
9
|
+
"npmPackagename": "@push.rocks/smartlog",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"projectDomain": "push.rocks"
|
|
12
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@push.rocks/smartlog",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "minimalistic distributed and extensible logging tool",
|
|
6
6
|
"keywords": [
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"@gitzone/tsbundle": "^2.0.6",
|
|
27
27
|
"@gitzone/tsrun": "^1.2.17",
|
|
28
28
|
"@gitzone/tstest": "^1.0.72",
|
|
29
|
-
"@
|
|
29
|
+
"@push.rocks/tapbundle": "^5.0.4",
|
|
30
30
|
"@types/node": "^18.6.1"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
33
|
+
"@push.rocks/isounique": "^1.0.4",
|
|
34
|
+
"@push.rocks/smartlog-interfaces": "^3.0.0"
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
37
|
"ts/**/*",
|
|
@@ -49,4 +49,4 @@
|
|
|
49
49
|
"last 1 chrome versions"
|
|
50
50
|
],
|
|
51
51
|
"type": "module"
|
|
52
|
-
}
|
|
52
|
+
}
|
package/ts/00_commitinfo_data.ts
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import * as plugins from './smartlog.plugins.js';
|
|
2
2
|
|
|
3
|
-
import { ILogDestination, ILogPackage } from '@pushrocks/smartlog-interfaces';
|
|
4
|
-
|
|
5
3
|
export class LogRouter {
|
|
6
4
|
/**
|
|
7
5
|
* all log destinations
|
|
8
6
|
*/
|
|
9
|
-
private logDestinations: ILogDestination[] = [];
|
|
7
|
+
private logDestinations: plugins.smartlogInterfaces.ILogDestination[] = [];
|
|
10
8
|
|
|
11
9
|
constructor() {}
|
|
12
10
|
|
|
13
|
-
public addLogDestination(logDestination: ILogDestination) {
|
|
11
|
+
public addLogDestination(logDestination: plugins.smartlogInterfaces.ILogDestination) {
|
|
14
12
|
this.logDestinations.push(logDestination);
|
|
15
13
|
}
|
|
16
14
|
|
|
17
15
|
// routes the log according to added logDestinations
|
|
18
|
-
public async routeLog(logPackageArg: ILogPackage) {
|
|
16
|
+
public async routeLog(logPackageArg: plugins.smartlogInterfaces.ILogPackage) {
|
|
19
17
|
for (const logDestination of this.logDestinations) {
|
|
20
18
|
await logDestination.handleLog(logPackageArg);
|
|
21
19
|
}
|
package/ts/smartlog.plugins.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as isounique from '@
|
|
2
|
-
import * as smartlogInterfaces from '@
|
|
1
|
+
import * as isounique from '@push.rocks/isounique';
|
|
2
|
+
import * as smartlogInterfaces from '@push.rocks/smartlog-interfaces';
|
|
3
3
|
|
|
4
4
|
export { isounique, smartlogInterfaces };
|