{"_id":"@ais-stack/logger","_rev":"5-a620d29fbab8ef04c9303796aa2f4cc7","name":"@ais-stack/logger","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@ais-stack/logger","version":"0.0.1","keywords":["logger","logging","structured","json","typescript","performance","microservices","observability","pino","winston"],"author":{"name":"Jean-Pierre Dupuis"},"license":"MIT","_id":"@ais-stack/logger@0.0.1","maintainers":[{"name":"skyzondev","email":"skyzondev@gmail.com"}],"homepage":"https://github.com/SkyZonDev/ais-logger#readme","bugs":{"url":"https://github.com/SkyZonDev/ais-logger/issues"},"dist":{"shasum":"898b3744d642a1cb1ace6465dbda6d4041d8fd28","tarball":"https://registry.npmjs.org/@ais-stack/logger/-/logger-0.0.1.tgz","fileCount":7,"integrity":"sha512-dDZAd3IZiuEgZiunIk7kpRHGBEvr9m2QCXuKeWvO20/sC7b4Pd7+YAKXM+owFV3dy9FSpIPDAGbQinwE42X1ug==","signatures":[{"sig":"MEUCIQD8QLVyazzFr25ZaDLATWhs+eFeybR/jYbZRKViPsVIwAIgaw5P3E996sNOiSASKT75Fd9kMOl+tMwyoUr4RNiZqrM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":123271},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"70ec9d05ad3ac99ce988ce52e123b5e99522a9d0","scripts":{"demo":"tsx examples/visual-formatter-demo.ts","lint":"biome check .","build":"tsup src/index.ts --format cjs,esm --dts --clean","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"skyzondev","email":"skyzondev@gmail.com"},"repository":{"url":"git+https://github.com/SkyZonDev/ais-logger.git","type":"git"},"_npmVersion":"11.2.0","description":"A high-performance, structured logger for Node.js with TypeScript support","directories":{},"sideEffects":false,"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"packageManager":"pnpm@10.28.2","devDependencies":{"tsx":"^4.21.0","tsup":"^8.5.1","typescript":"^5.9.3","@types/node":"^25.2.3","@biomejs/biome":"2.3.15"},"_npmOperationalInternal":{"tmp":"tmp/logger_0.0.1_1771343404161_0.4395708652831065","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@ais-stack/logger","version":"0.0.2","description":"A high-performance, structured logger for Node.js with TypeScript support","type":"module","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup src/index.ts --format esm,cjs --dts --clean","lint":"biome check .","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","demo":"tsx examples/visual-formatter-demo.ts","prepublishOnly":"pnpm run build"},"keywords":["logger","logging","structured","json","typescript","performance","microservices","observability","pino","winston"],"author":{"name":"Jean-Pierre Dupuis"},"repository":{"type":"git","url":"git+https://github.com/SkyZonDev/ais-logger.git"},"license":"MIT","packageManager":"pnpm@10.28.2","devDependencies":{"@biomejs/biome":"2.3.15","@types/node":"^25.2.3","tsup":"^8.5.1","tsx":"^4.21.0","typescript":"^5.9.3"},"engines":{"node":">=18"},"_id":"@ais-stack/logger@0.0.2","gitHead":"70ec9d05ad3ac99ce988ce52e123b5e99522a9d0","bugs":{"url":"https://github.com/SkyZonDev/ais-logger/issues"},"homepage":"https://github.com/SkyZonDev/ais-logger#readme","_nodeVersion":"22.18.0","_npmVersion":"11.2.0","dist":{"integrity":"sha512-vKOjEWd5ezGDs1rw91qPJdmB8V4VSqqQ+2X+N00YK3CXgVe5BPKoDg00XZL3G6gsdTHc/cWOWD1V/KjvnvBDZA==","shasum":"5a0fc9c86b75ae9d5c42b5903789fce9e2b4aa4e","tarball":"https://registry.npmjs.org/@ais-stack/logger/-/logger-0.0.2.tgz","fileCount":7,"unpackedSize":123051,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDkW+9rGqLfyy+FWEaSjnX/0AraysjJIB/nHI5T81dp+gIhALMoWB/3Cw9jfaEyTA0bI0P87SH/uaO1r4/TTvpCWiIG"}]},"_npmUser":{"name":"skyzondev","email":"skyzondev@gmail.com"},"directories":{},"maintainers":[{"name":"skyzondev","email":"skyzondev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/logger_0.0.2_1772492363226_0.44205197860287937"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-17T15:50:04.019Z","modified":"2026-03-02T22:59:23.510Z","1.0.0":"2026-02-17T12:16:27.100Z","1.0.2":"2026-02-17T12:47:12.078Z","0.0.1":"2026-02-17T15:50:04.327Z","0.0.2":"2026-03-02T22:59:23.384Z"},"bugs":{"url":"https://github.com/SkyZonDev/ais-logger/issues"},"author":{"name":"Jean-Pierre Dupuis"},"license":"MIT","homepage":"https://github.com/SkyZonDev/ais-logger#readme","keywords":["logger","logging","structured","json","typescript","performance","microservices","observability","pino","winston"],"repository":{"type":"git","url":"git+https://github.com/SkyZonDev/ais-logger.git"},"description":"A high-performance, structured logger for Node.js with TypeScript support","maintainers":[{"name":"skyzondev","email":"skyzondev@gmail.com"}],"readme":"# @ais-stack/logger\n\n> 🚀 A high-performance, structured logger for Node.js with first-class TypeScript support\n\n[![npm version](https://img.shields.io/npm/v/@ais-stack/logger.svg)](https://www.npmjs.com/package/@ais-stack/logger)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)\n\n## ✨ Features\n\n-   🎯 **Simple API** - Intuitive interface similar to console, but better\n-   ⚡ **High Performance** - Lazy serialization, minimal overhead\n-   📊 **Structured Logging** - JSON output for easy parsing and analysis\n-   🔒 **Security** - Automatic redaction of sensitive data\n-   🎨 **4 Visual Modes** - Pretty, Compact, Minimal, JSON\n-   🚨 **Error Emphasis** - Automatic visual highlighting for errors\n-   🔄 **Flow Tracking** - Visualize request flows across services\n-   🌳 **Hierarchical Context** - Child loggers inherit parent context\n-   📝 **TypeScript-First** - Fully typed API with excellent IDE support\n-   🔌 **Extensible** - Custom transports and formatters\n-   📦 **Zero Dependencies** - Lightweight and tree-shakable\n-   🏭 **Production Ready** - Battle-tested for microservices and cloud-native apps\n\n## 📦 Installation\n\n```bash\nnpm install @ais-stack/logger\n```\n\n```bash\nyarn add @ais-stack/logger\n```\n\n```bash\npnpm add @ais-stack/logger\n```\n\n## 🚀 Quick Start\n\n```typescript\nimport { csl } from \"@ais-stack/logger\";\n\n// Basic usage - just like console, but structured\ncsl.info(\"Application started\");\ncsl.debug(\"User data loaded\", { userId: 42, role: \"admin\" });\ncsl.warn(\"Cache miss detected\", { key: \"user:123\" });\ncsl.error(\"Database connection failed\", new Error(\"Connection timeout\"));\n```\n\n**Output (JSON mode):**\n\n```json\n{\"timestamp\":\"2026-02-15T12:00:00.000Z\",\"level\":\"info\",\"message\":\"Application started\"}\n{\"timestamp\":\"2026-02-15T12:00:01.000Z\",\"level\":\"debug\",\"message\":\"User data loaded\",\"userId\":42,\"role\":\"admin\"}\n{\"timestamp\":\"2026-02-15T12:00:02.000Z\",\"level\":\"warn\",\"message\":\"Cache miss detected\",\"key\":\"user:123\"}\n{\"timestamp\":\"2026-02-15T12:00:03.000Z\",\"level\":\"error\",\"message\":\"Database connection failed\",\"error\":{\"name\":\"Error\",\"message\":\"Connection timeout\",\"stack\":\"...\"}}\n```\n\n## 📖 Usage\n\n### Visual Modes\n\nThe logger now supports **4 visual modes** optimized for different use cases:\n\n#### 1. PRETTY Mode - For Development\n\n```typescript\nimport { configure } from \"@ais-stack/logger\";\n\nconfigure({\n    mode: \"pretty\",\n    emphasisErrors: true,\n    alignContext: true,\n    showSeparators: true,\n});\n\ncsl.info(\"User login\", { userId: 42, ip: \"192.168.1.10\", duration: 12 });\n```\n\n**Output:**\n\n```\n12:42:31.456  INFO     auth-service     req-abc123\n──────────────────────────────────────────────────\nUser login\n  userId       : 42\n  ip           : 192.168.1.10\n  duration     : 12ms\n```\n\n#### 2. COMPACT Mode - For High Volume\n\n```typescript\nconfigure({ mode: \"compact\" });\n\ncsl.info(\"User login\", { userId: 42, duration: 12 });\n```\n\n**Output:**\n\n```\n12:42:31 INFO auth-service req-abc123 → User login { userId:42, duration:12ms }\n```\n\n#### 3. MINIMAL Mode - For CI/CD\n\n```typescript\nconfigure({ mode: \"minimal\" });\n\ncsl.info(\"Build successful\");\ncsl.warn(\"Deprecated API used\");\ncsl.error(\"Deploy failed\");\n```\n\n**Output:**\n\n```\n12:42:31  build-service   ✓ Build successful\n12:42:32  api-service     ⚠ Deprecated API used\n12:42:33  deploy-service  ✖ Deploy failed\n```\n\n#### 4. Error Emphasis - Automatic\n\nErrors are automatically highlighted with special formatting:\n\n```typescript\nconst error = new Error(\"Connection timeout\");\ncsl.error(\"Database failed\", error, { host: \"localhost\", retry: true });\n```\n\n**Output:**\n\n```\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n12:42:33.789  ERROR    db-service     req-xyz789\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n✖ Database failed\n\nContext\n  host         : localhost\n  retry        : true\n\nStack\n  at connect (db.ts:45:12)\n  at initialize (db.ts:23:5)\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n```\n\n**See full visual formatting guide:** `VISUAL_FORMATTING.md`\n\n### Basic Logging\n\n```typescript\nimport { csl } from \"@ais-stack/logger\";\n\n// All standard log levels\ncsl.trace(\"Very detailed debugging info\");\ncsl.debug(\"Debugging information\");\ncsl.log(\"General log message\");\ncsl.info(\"Informational message\");\ncsl.warn(\"Warning message\");\ncsl.error(\"Error message\", new Error(\"Something went wrong\"));\ncsl.fatal(\"Critical error, application stopping\");\n```\n\n### Context Management\n\n```typescript\n// Create a logger with base context\nconst logger = csl.withContext({\n    service: \"auth-service\",\n    version: \"1.2.0\",\n    environment: \"production\",\n});\n\nlogger.info(\"User login\", { userId: 123 });\n// → { service: 'auth-service', version: '1.2.0', environment: 'production',\n//     level: 'info', message: 'User login', userId: 123 }\n\n// Create child logger (inherits parent context)\nconst requestLogger = logger.child({ requestId: \"req-abc123\" });\n\nrequestLogger.debug(\"Processing request\", { path: \"/api/users\" });\n// → All parent context + requestId + path\n```\n\n### Custom Logger Configuration\n\n```typescript\nimport {\n    createLogger,\n    ConsoleTransport,\n    FileTransport,\n    createAdvancedFormatter,\n} from \"@ais-stack/logger\";\n\n// Shared advanced formatter (pretty mode with visual helpers)\nconst prettyFormatter = createAdvancedFormatter({\n    mode: \"pretty\",\n    emphasisErrors: true,\n    alignContext: true,\n    showSeparators: true,\n    colors: true,\n    timestamp: true,\n});\n\nconst logger = createLogger({\n    level: \"info\",\n    context: {\n        service: \"api\",\n        version: \"1.0.0\",\n    },\n    redact: [\"password\", \"token\", \"creditCard\"],\n    formatter: prettyFormatter,\n    transports: [\n        new ConsoleTransport({ formatter: prettyFormatter }),\n        new FileTransport({\n            path: \"./logs/app.log\",\n            maxSize: 10 * 1024 * 1024, // 10MB\n            maxFiles: 5,\n        }),\n    ],\n});\n\nlogger.info(\"Server started\", { port: 3000 });\n```\n\n### Environment-Based Configuration\n\n```typescript\nimport { presets, configure } from \"@ais-stack/logger\";\n\n// Quick presets\nconst devLogger = presets.development(); // Pretty mode, debug level\nconst prodLogger = presets.production(); // JSON mode, info level\nconst compactLogger = presets.compact(); // Compact mode, high volume\nconst minimalLogger = presets.minimal(); // Minimal mode, ultra clean\n\n// Or configure globally\nconst env = process.env.NODE_ENV;\n\nconfigure({\n    mode: env === \"production\" ? \"compact\" : \"pretty\",\n    emphasisErrors: true,\n    alignContext: env !== \"production\",\n    colors: env !== \"production\",\n    flowTracking: env === \"development\",\n});\n```\n\n### Global Configuration with `logger.config.ts`\n\nFor larger applications, you can centralise all logger settings in a config file.\nThis file is **auto-chargé** au démarrage grâce au mécanisme d'autoload :\n\n```typescript\n// logger.config.ts (ou .js / .mjs / .cjs)\nimport { defineConfig } from \"@ais-stack/logger\";\n\nexport default defineConfig({\n    level: \"info\",\n    mode: \"pretty\",\n    emphasisErrors: true,\n    alignContext: true,\n    redact: [\"password\", \"token\"],\n\n    // Overrides par niveau\n    levels: {\n        trace: { mode: \"minimal\" },\n        debug: { mode: \"minimal\" },\n        info: { mode: \"compact\" },\n        warn: { mode: \"pretty\" },\n        error: { mode: \"pretty\", emphasisErrors: true },\n        fatal: { mode: \"pretty\", emphasisErrors: true },\n    },\n\n    // Overrides par environnement (NODE_ENV)\n    env: {\n        production: { mode: \"json\", level: \"warn\", colors: false },\n        development: { mode: \"pretty\", level: \"debug\", colors: true },\n        test: { mode: \"minimal\", level: \"error\", colors: false },\n    },\n});\n```\n\nPlace `logger.config.*` à la racine du projet (ou dans `src/` ou `config/`), puis :\n\n```typescript\n// main.ts (point d'entrée)\nimport \"./logger.config\"; // une seule fois\nimport { csl } from \"@ais-stack/logger\";\n\ncsl.info(\"Server started\"); // déjà configuré\n\n// Dans le reste du code\nimport { csl } from \"@ais-stack/logger\";\ncsl.debug(\"Something happened\"); // réutilise la même config globale\n```\n\n### Flow Tracking\n\nVisualize request flows across services:\n\n```typescript\nconfigure({\n    mode: \"pretty\",\n    flowTracking: true,\n});\n\nconst requestId = \"req-abc123\";\n\ncsl.info(\"Request received\", { requestId });\ncsl.info(\"Auth validated\", { requestId });\ncsl.info(\"Data fetched\", { requestId });\ncsl.info(\"Response sent\", { requestId });\n```\n\n**Output:**\n\n```\n12:42:31 INFO   api-gateway   req-abc123\n│\n├─ Request received\n│\n├─ Auth validated\n│\n├─ Data fetched\n│\n└─ Response sent\n```\n\n### Sensitive Data Redaction\n\n```typescript\nimport { createLogger } from \"@ais-stack/logger\";\n\nconst logger = createLogger({\n    redact: [\"password\", \"token\", \"apiKey\", \"creditCard\", \"*.ssn\"],\n});\n\nlogger.info(\"User registered\", {\n    username: \"john\",\n    email: \"john@example.com\",\n    password: \"secret123\", // Will be redacted\n    profile: {\n        name: \"John Doe\",\n        ssn: \"123-45-6789\", // Will be redacted (matches *.ssn)\n    },\n});\n\n// Output:\n// {\n//   \"username\": \"john\",\n//   \"email\": \"john@example.com\",\n//   \"password\": \"[REDACTED]\",\n//   \"profile\": {\n//     \"name\": \"John Doe\",\n//     \"ssn\": \"[REDACTED]\"\n//   }\n// }\n```\n\n### Error Logging\n\n```typescript\ntry {\n    throw new Error(\"Database connection failed\");\n} catch (error) {\n    // Error as second parameter\n    csl.error(\"Failed to fetch user\", error);\n\n    // Or with additional context\n    csl.error(\"Failed to fetch user\", error, { userId: 123, retries: 3 });\n\n    // Or error in context\n    csl.error(\"Failed to fetch user\", {\n        error,\n        userId: 123,\n        retries: 3,\n    });\n}\n```\n\n### Express.js Integration\n\n```typescript\nimport express from \"express\";\nimport { csl } from \"@ais-stack/logger\";\nimport { randomUUID } from \"crypto\";\n\nconst app = express();\n\n// Request logging middleware\napp.use((req, res, next) => {\n    const requestId = randomUUID();\n\n    // Create request-scoped logger\n    req.logger = csl.child({\n        requestId,\n        method: req.method,\n        url: req.url,\n        ip: req.ip,\n    });\n\n    req.logger.info(\"Request started\");\n\n    // Log response\n    res.on(\"finish\", () => {\n        req.logger.info(\"Request completed\", {\n            statusCode: res.statusCode,\n            duration: Date.now() - req.startTime,\n        });\n    });\n\n    next();\n});\n\n// Use in routes\napp.get(\"/users/:id\", async (req, res) => {\n    req.logger.debug(\"Fetching user\", { userId: req.params.id });\n\n    try {\n        const user = await getUser(req.params.id);\n        req.logger.info(\"User fetched successfully\");\n        res.json(user);\n    } catch (error) {\n        req.logger.error(\"Failed to fetch user\", error);\n        res.status(500).json({ error: \"Internal server error\" });\n    }\n});\n```\n\n### Custom Transports\n\n```typescript\nimport { Transport, LogEntry } from \"@ais-stack/logger\";\n\nclass HttpTransport implements Transport {\n    name = \"http\";\n    private url: string;\n\n    constructor(url: string) {\n        this.url = url;\n    }\n\n    async write(entry: LogEntry): Promise<void> {\n        await fetch(this.url, {\n            method: \"POST\",\n            headers: { \"Content-Type\": \"application/json\" },\n            body: JSON.stringify(entry),\n        });\n    }\n}\n\n// Use custom transport\nconst logger = createLogger({\n    transports: [\n        new ConsoleTransport(),\n        new HttpTransport(\"https://logs.example.com/ingest\"),\n    ],\n});\n```\n\n### Custom Formatters\n\n```typescript\nimport { Formatter, LogEntry, createLogger } from \"@ais-stack/logger\";\n\nclass CustomFormatter implements Formatter {\n    format(entry: LogEntry): string {\n        const { timestamp, level, message, ...context } = entry;\n        return `[${timestamp}] ${level.toUpperCase()}: ${message} ${JSON.stringify(\n            context\n        )}`;\n    }\n}\n\nconst logger = createLogger({\n    formatter: new CustomFormatter(),\n});\n```\n\n## 🎯 API Reference\n\n### `csl` - Global Logger\n\nThe default logger instance, ready to use out of the box.\n\n```typescript\nimport { csl } from '@ais-stack/logger';\n\ncsl.trace(message, context?, options?);\ncsl.debug(message, context?, options?);\ncsl.log(message, context?, options?);\ncsl.info(message, context?, options?);\ncsl.warn(message, context?, options?);\ncsl.error(message, errorOrContext?, context?, options?);\ncsl.fatal(message, errorOrContext?, context?, options?);\n```\n\n### `createLogger(config)` - Create Custom Logger\n\n```typescript\ninterface LoggerConfig {\n    level?: \"trace\" | \"debug\" | \"log\" | \"info\" | \"warn\" | \"error\" | \"fatal\";\n    context?: Record<string, unknown>;\n    transports?: Transport[];\n    formatter?: Formatter;\n    pretty?: boolean;\n    redact?: string[];\n    maxDepth?: number;\n    maxStringLength?: number;\n    timestamp?: boolean | \"iso\" | \"epoch\";\n    errorSerializer?: (error: Error) => Record<string, unknown>;\n    async?: boolean;\n}\n```\n\n### Logger Methods\n\n```typescript\n// Logging\nlogger.trace(\n  message: string,\n  context?: Record<string, unknown>,\n  options?: LogCallOptions,\n): void;\nlogger.debug(\n  message: string,\n  context?: Record<string, unknown>,\n  options?: LogCallOptions,\n): void;\nlogger.log(\n  message: string,\n  context?: Record<string, unknown>,\n  options?: LogCallOptions,\n): void;\nlogger.info(\n  message: string,\n  context?: Record<string, unknown>,\n  options?: LogCallOptions,\n): void;\nlogger.warn(\n  message: string,\n  context?: Record<string, unknown>,\n  options?: LogCallOptions,\n): void;\nlogger.error(\n  message: string,\n  errorOrContext?: Error | Record<string, unknown>,\n  context?: Record<string, unknown>,\n  options?: LogCallOptions,\n): void;\nlogger.fatal(\n  message: string,\n  errorOrContext?: Error | Record<string, unknown>,\n  context?: Record<string, unknown>,\n  options?: LogCallOptions,\n): void;\n\n// Context management\nlogger.child(context: Record<string, unknown>): Logger;\nlogger.withContext(context: Record<string, unknown>): Logger;\nlogger.with(options: LogCallOptions): Logger;\n\n// Configuration\nlogger.setLevel(level: LogLevelName): void;\nlogger.getLevel(): LogLevelName;\nlogger.isLevelEnabled(level: LogLevelName): boolean;\n\n// Lifecycle\nlogger.flush(): Promise<void>;\nlogger.close(): Promise<void>;\n```\n\n## 🏆 Comparison with Alternatives\n\n| Feature              | @ais-stack/logger | Pino     | Winston |\n| -------------------- | ----------------- | -------- | ------- |\n| Performance          | ⚡⚡⚡            | ⚡⚡⚡   | ⚡⚡    |\n| TypeScript-first     | ✅                | ⚠️       | ⚠️      |\n| Zero dependencies    | ✅                | ❌       | ❌      |\n| Hierarchical context | ✅                | ✅       | ⚠️      |\n| Lazy serialization   | ✅                | ✅       | ❌      |\n| Tree-shakable        | ✅                | ⚠️       | ❌      |\n| Bundle size          | ~35KB              | ~8KB     | ~50KB   |\n| API simplicity       | ⭐⭐⭐⭐⭐        | ⭐⭐⭐⭐ | ⭐⭐⭐  |\n\n## 🔧 Advanced Configuration\n\n### Performance Tuning\n\n```typescript\nconst logger = createLogger({\n    // Async mode - non-blocking writes\n    async: true,\n\n    // Limit serialization depth\n    maxDepth: 5,\n\n    // Truncate long strings\n    maxStringLength: 1000,\n\n    // Disable debug in production\n    level: process.env.NODE_ENV === \"production\" ? \"info\" : \"debug\",\n});\n```\n\n### Elasticsearch Integration\n\n```typescript\nconst logger = createLogger({\n    context: {\n        \"@timestamp\": () => new Date().toISOString(),\n        \"service.name\": \"my-service\",\n        \"service.version\": \"1.0.0\",\n        \"host.name\": os.hostname(),\n    },\n});\n```\n\n## 📄 License\n\nMIT © AIS Forge\n\n## 🤝 Contributing\n\nContributions welcome! Please read our contributing guidelines first.\n\n## 📞 Support\n\n-   📧 Email: support@ais-stack.com\n-   🐛 Issues: [GitHub Issues](https://github.com/ais-stack/logger/issues)\n-   💬 Discussions: [GitHub Discussions](https://github.com/ais-stack/logger/discussions)\n","readmeFilename":"README.md"}