fixparser-plugin-log-console 8.3.1 → 8.3.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/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # fixparser-plugin-log-console
2
+
3
+ The `fixparser-plugin-log-console` plugin provides an easy way to log messages to the console in either a human-readable text or JSON format. It is designed to work seamlessly with the `FIXParser` TypeScript library, making it ideal for logging FIX message parsing activities.
4
+
5
+ ## Features
6
+ - Output logs in either plain text or JSON format.
7
+ - Supports dynamic format configuration after initialization.
8
+ - Simple integration with `FIXParser` logging system.
9
+
10
+ ## Installation
11
+
12
+ To install the plugin, ensure you have `FIXParser` installed, then run the following command:
13
+
14
+ ```bash
15
+ npm install fixparser-console-log
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ```typescript
21
+ import { ConsoleLogTransport } from 'fixparser-console-log';
22
+ import { Logger } from 'fixparser'; // Assuming Logger is part of FIXParser
23
+
24
+ // Create an instance of ConsoleLogTransport with the desired format
25
+ const consoleLogTransport = new ConsoleLogTransport({ format: 'json' });
26
+
27
+ // Add the transport to the logger
28
+ const logger = new Logger({ name: 'TestLogger', level: 'info', transport: consoleLogTransport });
29
+
30
+ ```
31
+
32
+ ## Configuration Options
33
+
34
+ The `ConsoleLogTransport` constructor accepts the following option:
35
+
36
+ - **`format`**: Specifies the output format of the logs. Choose from:
37
+ - `'console'` (text format)
38
+ - `'json'` (structured JSON format)
39
+
40
+ ## License
41
+ This project is licensed under a Commercial License - see the [LICENSE](https://gitlab.com/logotype/fixparser/-/blob/dev/LICENSE.md) file for details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fixparser-plugin-log-console",
3
- "version": "8.3.1",
3
+ "version": "8.3.2",
4
4
  "description": "Console / JSON logger for FIXParser",
5
5
  "files": ["./build/", "./types/", "./LICENSE.md"],
6
6
  "repository": {
package/types/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from './ConsoleLogTransport.ts';
1
+ export * from './ConsoleLogTransport';