fixparser-plugin-log-console 9.1.7-2d99618b → 9.1.7-af630b11

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.
@@ -39,7 +39,6 @@ var ConsoleLogTransport = class {
39
39
  */
40
40
  async send(log) {
41
41
  if (this.format === "json") {
42
- console.log(JSON.stringify(log));
43
42
  } else {
44
43
  const { name, id, message, level, ...additionalProperties } = log;
45
44
  const kv = Object.entries(additionalProperties).map(([key, value]) => `${key}: ${value}`);
@@ -48,7 +47,7 @@ var ConsoleLogTransport = class {
48
47
  logMessage += `${name} `;
49
48
  }
50
49
  logMessage += `${id}: ${message}`;
51
- console.log(logMessage, kv.join(", "));
50
+ void kv;
52
51
  }
53
52
  }
54
53
  /**
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/ConsoleLogTransport.ts"],
4
- "sourcesContent": ["import type { ILogTransporter, LogMessage } from 'fixparser-common';\n\n/**\n * Logger output format options.\n *\n * - 'console': Output log in plain text format\n * - 'json': Output log in JSON format\n *\n * @public\n */\nexport type ConsoleFormat = 'console' | 'json';\n\n/**\n * A LogTransporter implementation for logging to the console.\n * It supports both text (console) and JSON formats.\n */\nexport class ConsoleLogTransport implements ILogTransporter {\n private format: ConsoleFormat;\n\n constructor({ format = 'json' }: { format: ConsoleFormat }) {\n this.format = format;\n }\n\n /**\n * Configures the format for console logging (either 'console' for text or 'json').\n */\n configure(config: { format: 'console' | 'json' }): void {\n this.format = config.format || 'json';\n }\n\n /**\n * Sends the log message to the console in the configured format.\n */\n async send(log: LogMessage): Promise<void> {\n if (this.format === 'json') {\n console.log(JSON.stringify(log));\n } else {\n const { name, id, message, level, ...additionalProperties } = log;\n const kv = Object.entries(additionalProperties).map(([key, value]) => `${key}: ${value}`);\n let logMessage = '';\n if (name) {\n logMessage += `${name} `;\n }\n logMessage += `${id}: ${message}`;\n console.log(logMessage, kv.join(', '));\n }\n }\n\n /**\n * Flushes the log buffer (if any buffering mechanism exists).\n */\n async flush(): Promise<void> {\n // No flushing needed for console transport\n }\n\n /**\n * Closes the transport (not needed for console, but keeping the method for consistency).\n */\n async close(): Promise<void> {\n // No close logic needed for console transport\n }\n\n /**\n * Returns the status of the transport (always \"connected\" for console).\n */\n status(): string {\n return 'connected';\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBO,IAAM,sBAAN,MAAqD;AAAA,EAChD;AAAA,EAER,YAAY,EAAE,SAAS,OAAO,GAA8B;AACxD,SAAK,SAAS;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA,EAKA,UAAU,QAA8C;AACpD,SAAK,SAAS,OAAO,UAAU;AAAA,EACnC;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,KAAK,KAAgC;AACvC,QAAI,KAAK,WAAW,QAAQ;AACxB,cAAQ,IAAI,KAAK,UAAU,GAAG,CAAC;AAAA,IACnC,OAAO;AACH,YAAM,EAAE,MAAM,IAAI,SAAS,OAAO,GAAG,qBAAqB,IAAI;AAC9D,YAAM,KAAK,OAAO,QAAQ,oBAAoB,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,GAAG,GAAG,KAAK,KAAK,EAAE;AACxF,UAAI,aAAa;AACjB,UAAI,MAAM;AACN,sBAAc,GAAG,IAAI;AAAA,MACzB;AACA,oBAAc,GAAG,EAAE,KAAK,OAAO;AAC/B,cAAQ,IAAI,YAAY,GAAG,KAAK,IAAI,CAAC;AAAA,IACzC;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,QAAuB;AAAA,EAE7B;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,QAAuB;AAAA,EAE7B;AAAA;AAAA;AAAA;AAAA,EAKA,SAAiB;AACb,WAAO;AAAA,EACX;AACJ;",
4
+ "sourcesContent": ["import type { ILogTransporter, LogMessage } from 'fixparser-common';\n\n/**\n * Logger output format options.\n *\n * - 'console': Output log in plain text format\n * - 'json': Output log in JSON format\n *\n * @public\n */\nexport type ConsoleFormat = 'console' | 'json';\n\n/**\n * A LogTransporter implementation for logging to the console.\n * It supports both text (console) and JSON formats.\n */\nexport class ConsoleLogTransport implements ILogTransporter {\n private format: ConsoleFormat;\n\n constructor({ format = 'json' }: { format: ConsoleFormat }) {\n this.format = format;\n }\n\n /**\n * Configures the format for console logging (either 'console' for text or 'json').\n */\n configure(config: { format: 'console' | 'json' }): void {\n this.format = config.format || 'json';\n }\n\n /**\n * Sends the log message to the console in the configured format.\n */\n async send(log: LogMessage): Promise<void> {\n if (this.format === 'json') {\n //console.log(JSON.stringify(log)); // TODO RE-ENABLE\n } else {\n const { name, id, message, level, ...additionalProperties } = log;\n const kv = Object.entries(additionalProperties).map(([key, value]) => `${key}: ${value}`);\n let logMessage = '';\n if (name) {\n logMessage += `${name} `;\n }\n logMessage += `${id}: ${message}`;\n void kv;\n //console.log(logMessage, kv.join(', ')); // TODO RE-ENABLE\n }\n }\n\n /**\n * Flushes the log buffer (if any buffering mechanism exists).\n */\n async flush(): Promise<void> {\n // No flushing needed for console transport\n }\n\n /**\n * Closes the transport (not needed for console, but keeping the method for consistency).\n */\n async close(): Promise<void> {\n // No close logic needed for console transport\n }\n\n /**\n * Returns the status of the transport (always \"connected\" for console).\n */\n status(): string {\n return 'connected';\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBO,IAAM,sBAAN,MAAqD;AAAA,EAChD;AAAA,EAER,YAAY,EAAE,SAAS,OAAO,GAA8B;AACxD,SAAK,SAAS;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA,EAKA,UAAU,QAA8C;AACpD,SAAK,SAAS,OAAO,UAAU;AAAA,EACnC;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,KAAK,KAAgC;AACvC,QAAI,KAAK,WAAW,QAAQ;AAAA,IAE5B,OAAO;AACH,YAAM,EAAE,MAAM,IAAI,SAAS,OAAO,GAAG,qBAAqB,IAAI;AAC9D,YAAM,KAAK,OAAO,QAAQ,oBAAoB,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,GAAG,GAAG,KAAK,KAAK,EAAE;AACxF,UAAI,aAAa;AACjB,UAAI,MAAM;AACN,sBAAc,GAAG,IAAI;AAAA,MACzB;AACA,oBAAc,GAAG,EAAE,KAAK,OAAO;AAC/B,WAAK;AAAA,IAET;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,QAAuB;AAAA,EAE7B;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,QAAuB;AAAA,EAE7B;AAAA;AAAA;AAAA;AAAA,EAKA,SAAiB;AACb,WAAO;AAAA,EACX;AACJ;",
6
6
  "names": []
7
7
  }
@@ -15,7 +15,6 @@ var ConsoleLogTransport = class {
15
15
  */
16
16
  async send(log) {
17
17
  if (this.format === "json") {
18
- console.log(JSON.stringify(log));
19
18
  } else {
20
19
  const { name, id, message, level, ...additionalProperties } = log;
21
20
  const kv = Object.entries(additionalProperties).map(([key, value]) => `${key}: ${value}`);
@@ -24,7 +23,7 @@ var ConsoleLogTransport = class {
24
23
  logMessage += `${name} `;
25
24
  }
26
25
  logMessage += `${id}: ${message}`;
27
- console.log(logMessage, kv.join(", "));
26
+ void kv;
28
27
  }
29
28
  }
30
29
  /**
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/ConsoleLogTransport.ts"],
4
- "sourcesContent": ["import type { ILogTransporter, LogMessage } from 'fixparser-common';\n\n/**\n * Logger output format options.\n *\n * - 'console': Output log in plain text format\n * - 'json': Output log in JSON format\n *\n * @public\n */\nexport type ConsoleFormat = 'console' | 'json';\n\n/**\n * A LogTransporter implementation for logging to the console.\n * It supports both text (console) and JSON formats.\n */\nexport class ConsoleLogTransport implements ILogTransporter {\n private format: ConsoleFormat;\n\n constructor({ format = 'json' }: { format: ConsoleFormat }) {\n this.format = format;\n }\n\n /**\n * Configures the format for console logging (either 'console' for text or 'json').\n */\n configure(config: { format: 'console' | 'json' }): void {\n this.format = config.format || 'json';\n }\n\n /**\n * Sends the log message to the console in the configured format.\n */\n async send(log: LogMessage): Promise<void> {\n if (this.format === 'json') {\n console.log(JSON.stringify(log));\n } else {\n const { name, id, message, level, ...additionalProperties } = log;\n const kv = Object.entries(additionalProperties).map(([key, value]) => `${key}: ${value}`);\n let logMessage = '';\n if (name) {\n logMessage += `${name} `;\n }\n logMessage += `${id}: ${message}`;\n console.log(logMessage, kv.join(', '));\n }\n }\n\n /**\n * Flushes the log buffer (if any buffering mechanism exists).\n */\n async flush(): Promise<void> {\n // No flushing needed for console transport\n }\n\n /**\n * Closes the transport (not needed for console, but keeping the method for consistency).\n */\n async close(): Promise<void> {\n // No close logic needed for console transport\n }\n\n /**\n * Returns the status of the transport (always \"connected\" for console).\n */\n status(): string {\n return 'connected';\n }\n}\n"],
5
- "mappings": ";AAgBO,IAAM,sBAAN,MAAqD;AAAA,EAChD;AAAA,EAER,YAAY,EAAE,SAAS,OAAO,GAA8B;AACxD,SAAK,SAAS;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA,EAKA,UAAU,QAA8C;AACpD,SAAK,SAAS,OAAO,UAAU;AAAA,EACnC;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,KAAK,KAAgC;AACvC,QAAI,KAAK,WAAW,QAAQ;AACxB,cAAQ,IAAI,KAAK,UAAU,GAAG,CAAC;AAAA,IACnC,OAAO;AACH,YAAM,EAAE,MAAM,IAAI,SAAS,OAAO,GAAG,qBAAqB,IAAI;AAC9D,YAAM,KAAK,OAAO,QAAQ,oBAAoB,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,GAAG,GAAG,KAAK,KAAK,EAAE;AACxF,UAAI,aAAa;AACjB,UAAI,MAAM;AACN,sBAAc,GAAG,IAAI;AAAA,MACzB;AACA,oBAAc,GAAG,EAAE,KAAK,OAAO;AAC/B,cAAQ,IAAI,YAAY,GAAG,KAAK,IAAI,CAAC;AAAA,IACzC;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,QAAuB;AAAA,EAE7B;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,QAAuB;AAAA,EAE7B;AAAA;AAAA;AAAA;AAAA,EAKA,SAAiB;AACb,WAAO;AAAA,EACX;AACJ;",
4
+ "sourcesContent": ["import type { ILogTransporter, LogMessage } from 'fixparser-common';\n\n/**\n * Logger output format options.\n *\n * - 'console': Output log in plain text format\n * - 'json': Output log in JSON format\n *\n * @public\n */\nexport type ConsoleFormat = 'console' | 'json';\n\n/**\n * A LogTransporter implementation for logging to the console.\n * It supports both text (console) and JSON formats.\n */\nexport class ConsoleLogTransport implements ILogTransporter {\n private format: ConsoleFormat;\n\n constructor({ format = 'json' }: { format: ConsoleFormat }) {\n this.format = format;\n }\n\n /**\n * Configures the format for console logging (either 'console' for text or 'json').\n */\n configure(config: { format: 'console' | 'json' }): void {\n this.format = config.format || 'json';\n }\n\n /**\n * Sends the log message to the console in the configured format.\n */\n async send(log: LogMessage): Promise<void> {\n if (this.format === 'json') {\n //console.log(JSON.stringify(log)); // TODO RE-ENABLE\n } else {\n const { name, id, message, level, ...additionalProperties } = log;\n const kv = Object.entries(additionalProperties).map(([key, value]) => `${key}: ${value}`);\n let logMessage = '';\n if (name) {\n logMessage += `${name} `;\n }\n logMessage += `${id}: ${message}`;\n void kv;\n //console.log(logMessage, kv.join(', ')); // TODO RE-ENABLE\n }\n }\n\n /**\n * Flushes the log buffer (if any buffering mechanism exists).\n */\n async flush(): Promise<void> {\n // No flushing needed for console transport\n }\n\n /**\n * Closes the transport (not needed for console, but keeping the method for consistency).\n */\n async close(): Promise<void> {\n // No close logic needed for console transport\n }\n\n /**\n * Returns the status of the transport (always \"connected\" for console).\n */\n status(): string {\n return 'connected';\n }\n}\n"],
5
+ "mappings": ";AAgBO,IAAM,sBAAN,MAAqD;AAAA,EAChD;AAAA,EAER,YAAY,EAAE,SAAS,OAAO,GAA8B;AACxD,SAAK,SAAS;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA,EAKA,UAAU,QAA8C;AACpD,SAAK,SAAS,OAAO,UAAU;AAAA,EACnC;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,KAAK,KAAgC;AACvC,QAAI,KAAK,WAAW,QAAQ;AAAA,IAE5B,OAAO;AACH,YAAM,EAAE,MAAM,IAAI,SAAS,OAAO,GAAG,qBAAqB,IAAI;AAC9D,YAAM,KAAK,OAAO,QAAQ,oBAAoB,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,GAAG,GAAG,KAAK,KAAK,EAAE;AACxF,UAAI,aAAa;AACjB,UAAI,MAAM;AACN,sBAAc,GAAG,IAAI;AAAA,MACzB;AACA,oBAAc,GAAG,EAAE,KAAK,OAAO;AAC/B,WAAK;AAAA,IAET;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,QAAuB;AAAA,EAE7B;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,QAAuB;AAAA,EAE7B;AAAA;AAAA;AAAA;AAAA,EAKA,SAAiB;AACb,WAAO;AAAA,EACX;AACJ;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fixparser-plugin-log-console",
3
- "version": "9.1.7-2d99618b",
4
- "description": "Console / JSON logger for FIXParser",
3
+ "version": "9.1.7-af630b11",
4
+ "description": "Console / JSON Log transport for FIXParser",
5
5
  "files": [
6
6
  "./build/",
7
7
  "./types/",
@@ -17,7 +17,7 @@
17
17
  "build": "npm run clean && npm run types && npm run build:main",
18
18
  "build:main": "node --experimental-strip-types -r ./../../esbuild-hook.ts ./scripts/build",
19
19
  "clean": "node --experimental-strip-types -r ./../../esbuild-hook.ts ./scripts/clean",
20
- "test": "jest --ci --colors --detectOpenHandles --verbose=false",
20
+ "disabled_test": "jest --ci --colors --detectOpenHandles --verbose=false",
21
21
  "types": "tsc --declaration --emitDeclarationOnly --stripInternal --declarationDir ./types",
22
22
  "prepare": "husky",
23
23
  "upgrade-interactive": "ncu -u -t latest"
@@ -30,10 +30,11 @@
30
30
  "FIXParser",
31
31
  "FIXParser Logger",
32
32
  "Console Logger",
33
- "Console JSON Logger"
33
+ "Console JSON Logger",
34
+ "Console Log Transport"
34
35
  ],
35
36
  "homepage": "https://fixparser.dev",
36
- "license": "SEE LICENSE IN LICENSE.md",
37
+ "license": "LICENSE.md",
37
38
  "types": "./types/ConsoleLogTransport.d.ts",
38
39
  "exports": {
39
40
  ".": {