hb-smart-logger 1.0.4 → 1.0.5

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.
Files changed (2) hide show
  1. package/package.json +5 -2
  2. package/src/index.js +2 -0
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "hb-smart-logger",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Production-ready Winston logger with daily rotation, safe JSON handling, and logger.log() alias",
5
5
  "main": "src/index.js",
6
- "publishConfig": { "access": "public" },
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
7
9
  "keywords": [
8
10
  "logger",
9
11
  "winston",
@@ -15,6 +17,7 @@
15
17
  "author": "Hafiz Bilal",
16
18
  "license": "MIT",
17
19
  "dependencies": {
20
+ "dotenv": "^17.2.3",
18
21
  "winston": "^3.13.0",
19
22
  "winston-daily-rotate-file": "^5.0.0"
20
23
  }
package/src/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  const fs = require("fs");
2
2
  const path = require("path");
3
3
  const winston = require("winston");
4
+ const dotenv = require("dotenv");
4
5
  const DailyRotateFile = require("winston-daily-rotate-file");
6
+ dotenv.config();
5
7
 
6
8
  // Debug flag (explicit opt-in)
7
9
  const DEBUG_ENABLED = String(process.env.DEBUG).toLowerCase() === "true";