@crimsonsunset/jsg-logger 1.7.8 → 1.7.10

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/index.js +7 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -47,6 +47,7 @@ class JSGLogger {
47
47
  // Static singleton instance
48
48
  static _instance = null;
49
49
  static _enhancedLoggers = null;
50
+ static _hasLoggedInitialization = false;
50
51
 
51
52
  constructor() {
52
53
  this.loggers = {};
@@ -152,8 +153,8 @@ class JSGLogger {
152
153
 
153
154
  this.initialized = true;
154
155
 
155
- // Log initialization success
156
- if (this.loggers.core) {
156
+ // Log initialization success (only on first initialization)
157
+ if (!JSGLogger._hasLoggedInitialization && this.loggers.core) {
157
158
  this.loggers.core.info('JSG Logger initialized', {
158
159
  environment: this.environment,
159
160
  components: components.length,
@@ -161,6 +162,7 @@ class JSGLogger {
161
162
  configPaths: configManager.loadedPaths,
162
163
  fileOverrides: Object.keys(configManager.config.fileOverrides || {}).length
163
164
  });
165
+ JSGLogger._hasLoggedInitialization = true;
164
166
  }
165
167
 
166
168
  return this.getLoggerExports();
@@ -229,8 +231,8 @@ class JSGLogger {
229
231
 
230
232
  this.initialized = true;
231
233
 
232
- // Log initialization success
233
- if (this.loggers.core) {
234
+ // Log initialization success (only on first initialization)
235
+ if (!JSGLogger._hasLoggedInitialization && this.loggers.core) {
234
236
  this.loggers.core.info('JSG Logger initialized (sync)', {
235
237
  environment: this.environment,
236
238
  components: components.length,
@@ -238,6 +240,7 @@ class JSGLogger {
238
240
  fileOverrides: Object.keys(configManager.config.fileOverrides || {}).length,
239
241
  timestampMode: configManager.getTimestampMode()
240
242
  });
243
+ JSGLogger._hasLoggedInitialization = true;
241
244
  }
242
245
 
243
246
  return this.getLoggerExports();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crimsonsunset/jsg-logger",
3
- "version": "1.7.8",
3
+ "version": "1.7.10",
4
4
  "type": "module",
5
5
  "description": "Multi-environment logger with smart detection, file-level overrides, and beautiful console formatting. Test it live: https://logger.joesangiorgio.com/",
6
6
  "main": "index.js",