fix(core): Enhanced debugging and improved dependency tracking

This commit is contained in:
2025-01-23 20:06:18 +01:00
parent 57d1dc3fe0
commit 6a373a93b3
7 changed files with 101 additions and 84 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartcontext',
version: '2.1.6',
version: '2.1.7',
description: 'A module providing advanced asynchronous context management to enrich logs with context and manage scope effectively in Node.js applications.'
}

View File

@ -1 +1,2 @@
export * from './logcontext.classes.asynccontext.js';
export * from './logcontext.classes.asyncstore.js';

View File

@ -16,7 +16,7 @@ export class AsyncStore {
* Logs debug info if process.env.DEBUG is set.
*/
private logDebug(functionName: string, before: Record<string, any>, after: Record<string, any>) {
if (process.env.DEBUG) {
if (typeof process !== 'undefined' && process.env && process.env.DEBUG) {
console.log(`Store ID: ${this.id}`);
console.log(`Function: ${functionName}`);
console.log('--- Before ---');