ntlogger 2.2.1 → 2.2.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 CHANGED
@@ -24,7 +24,7 @@ npm install ntlogger
24
24
 
25
25
  ```javascript
26
26
  // Import the logger
27
- const logger = require('../lib/logger');
27
+ const logger = require('ntlogger');
28
28
 
29
29
  // Create a logger instance
30
30
  const log = logger('MyApp');
@@ -41,10 +41,12 @@ log.internal('Internal message');
41
41
  ```
42
42
 
43
43
  ## Output
44
- Quick Start
44
+
45
+ Check out [Quick Start](https://github.com/NightSquawk/NightTimeLogger/blob/main/examples/quick-start.js)
45
46
  ![Quick Start](https://github.com/NightSquawk/NightTimeLogger/blob/main/images/quick-start.png)
46
47
 
47
- Full Configuration
48
+
49
+ Check out [Full Configuration](https://github.com/NightSquawk/NightTimeLogger/blob/main/examples/full-configuration.js)
48
50
  ![Full Configuration](https://github.com/NightSquawk/NightTimeLogger/blob/main/images/full-configuration.png)
49
51
 
50
52
  ## Configuration Options
package/index.js CHANGED
@@ -1 +1,47 @@
1
- exports.logger = require('./lib/logger');
1
+ /**
2
+ * Change Log:
3
+ *
4
+ * v2.2.2 - 03/31/2024:
5
+ * Take 2 on setting up CI with GitHub Actions to NPM
6
+ * Housekeeping
7
+ *
8
+ * v2.2.1 - 03/31/2024:
9
+ * Tried and failed to setup CI with GitHub Actions to NPM
10
+ *
11
+ * v2.2.0 - 03/31/2024:
12
+ * Renamed project to NightTimeLogger, no longer a daytime logger (old name was Nightly-Logger)
13
+ * Published the project on NPM
14
+ * Added a location parameter to the logger function
15
+ * Modified the logger instance creation to include the location in the metadata
16
+ * Added a map to store logger instances by location instead of one global instance
17
+ * This allows the location to be included in the metadata of each log statement
18
+ * Added a custom 'internal' log level to log internal messages
19
+ * Shortened the output by removing Session from Session ID to increase line availability for messages
20
+ * Increased log level padding to 8 characters to ensure consistent spacing
21
+ * (this looks a bit weird, not sure if I like it but I also tried centered log levels and it no look good :( )
22
+ * Added many configuration options to the logger function (level, internal, console, file, filename, path, maxSize, maxFiles, timestamp)
23
+ *
24
+ * TODO: locations has a weird bug that carries location from instance to instance, ONLY, when another instanced is called
25
+ * from a different file. I have no idea why this is happening.
26
+ * i.e. app.js calls route.js then back to app.js but the location is still route.js. This does not happen when directly
27
+ * calling route.js.
28
+ * TODO: probably rewrite the whole thing to improve readability and maintainability
29
+ * TODO: cry
30
+ * TODO: timestamp, filename have not been tested nor implemented
31
+ *
32
+ * v2.1.0 - 03/17/2024:
33
+ * Modified custom log colors to use ANSI escape codes
34
+ * Changed the console formatter to paint the level and message with the corresponding color
35
+ * Modified the color generation formula. Now with prettier colors!
36
+ *
37
+ * v2.0.0 - 01/20/2024:
38
+ * Added bright color generation
39
+ * Added session ID generation
40
+ * Added separate console and file formatters
41
+ * Added rotating file transport with 5 files of 1MB each (5MB total)
42
+ *
43
+ * v1.0.0 - 10/18/2023:
44
+ * Initial release
45
+ */
46
+
47
+ module.exports = require('./lib/logger');
package/lib/logger.js CHANGED
@@ -6,43 +6,9 @@
6
6
  * any Node.js project.
7
7
  *
8
8
  * Author: Kevin R. (Kvrnn#6940, Syntax#5569)
9
- * Date: 01/20/2024
10
- * Current Version: 2.1.0
9
+ * Date: 03/31/2024
10
+ * Current Version: 2.1.2
11
11
  * License: GPL-3.0
12
- *
13
- * Change Log:
14
- * v2.2.0 - 03/31/2024:
15
- * Renamed project to NightTimeLogger, no longer a daytime logger (old name was Nightly-Logger)
16
- * Published the project on NPM
17
- * Added a location parameter to the logger function
18
- * Modified the logger instance creation to include the location in the metadata
19
- * Added a map to store logger instances by location instead of one global instance
20
- * This allows the location to be included in the metadata of each log statement
21
- * Added a custom 'internal' log level to log internal messages
22
- * Shortened the output by removing Session from Session ID to increase line availability for messages
23
- * Increased log level padding to 8 characters to ensure consistent spacing
24
- * (this looks a bit weird, not sure if I like it but I also tried centered log levels and it no look good :( )
25
- * Added many configuration options to the logger function (level, internal, console, file, filename, path, maxSize, maxFiles, timestamp)
26
- * TODO: locations has a weird bug that carries location from instance to instance, ONLY, when another instanced is called
27
- * from a different file. I have no idea why this is happening.
28
- * i.e. app.js calls route.js then back to app.js but the location is still route.js. This does not happen when directly
29
- * calling route.js.
30
- * TODO: probably rewrite the whole thing to improve readability and maintainability
31
- * TODO: cry
32
- * TODO: timestamp, console, file, filename have not been tested nor implemented
33
- * v2.1.0 - 03/17/2024:
34
- * Modified custom log colors to use ANSI escape codes
35
- * Changed the console formatter to paint the level and message with the corresponding color
36
- * Modified the color generation formula. Now with prettier colors!
37
- *
38
- * v2.0.0 - 01/20/2024:
39
- * Added bright color generation
40
- * Added session ID generation
41
- * Added separate console and file formatters
42
- * Added rotating file transport with 5 files of 1MB each (5MB total)
43
- *
44
- * v1.0.0 - 10/18/2023:
45
- * Initial release
46
12
  */
47
13
  const winston = require('winston');
48
14
  const crypto = require('crypto');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ntlogger",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/NightSquawk/NightTimeLogger.git"