{"_id":"@abdokouta/react-logger","_rev":"6-43a6502ea08ec0976ad6aa7b2540bd10","name":"@abdokouta/react-logger","dist-tags":{"latest":"1.1.2"},"versions":{"1.0.0":{"name":"@abdokouta/react-logger","version":"1.0.0","keywords":["react","logger","logging","console","transport","formatter"],"author":{"name":"Pixielity"},"license":"MIT","_id":"@abdokouta/react-logger@1.0.0","maintainers":[{"name":"abdokouta","email":"akouta66@gmail.com"}],"homepage":"https://github.com/pixielity-inc/react-logger#readme","bugs":{"url":"https://github.com/pixielity-inc/react-logger/issues"},"dist":{"shasum":"4ef45b84a8ee6478ec9f35b723058338f87b1102","tarball":"https://registry.npmjs.org/@abdokouta/react-logger/-/react-logger-1.0.0.tgz","fileCount":9,"integrity":"sha512-LKRbnCtGGrVTiochgRKqmBoQ7BZto9uASMDHmMYwQ/LeBh7XD79DhXXvlw/2bcG3kWq4CaPJWTaXr8FzRg0OrA==","signatures":[{"sig":"MEYCIQDi9n0Et/P4D78Dv4Y8kVT2hi0e3QyaQRpss3IBQ44neQIhAIk6M60l+5vv9tziTcXwgpIpT7tF/owvv+2G6FX0PQw0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":256213},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"4df93a63c2b0b699187ef25818b5ddff7a563e4c","private":false,"scripts":{"dev":"tsup --watch","lint":"eslint . --max-warnings 0","test":"vitest --run","build":"tsup","clean":"rm -rf dist","format":"prettier --write \"src/**/*.{ts,tsx,js,jsx,json}\"","test:ui":"vitest --ui","lint:fix":"eslint . --fix","test:watch":"vitest","check-types":"tsc --noEmit","test:coverage":"vitest --run --coverage"},"_npmUser":{"name":"abdokouta","email":"akouta66@gmail.com"},"repository":{"url":"git+https://github.com/pixielity-inc/react-logger.git","type":"git"},"_npmVersion":"10.9.4","description":"Flexible logging system with multiple formatters and transporters for React","directories":{},"_nodeVersion":"22.22.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","react":"^19.2.4","eslint":"^10.1.0","vitest":"^4.1.2","prettier":"^3.8.1","@vitest/ui":"^4.1.2","typescript":"6.0.2","@types/node":"^25.5.0","@types/react":"^19.2.14","@abdokouta/react-di":"^2.1.0","@nesvel/tsup-config":"^1.0.3","@nesvel/eslint-config":"^1.0.5","@nesvel/prettier-config":"^1.0.3","@nesvel/typescript-config":"^1.0.4"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","@abdokouta/react-di":"^2.1.0"},"peerDependenciesMeta":{"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/react-logger_1.0.0_1774937795729_0.6281893819993776","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@abdokouta/react-logger","version":"1.0.1","keywords":["react","logger","logging","console","transport","formatter","dependency-injection","di"],"author":{"url":"https://github.com/abdokouta","name":"Abdelrhman Kouta","email":"abdelrhman@pixielity.com"},"license":"MIT","_id":"@abdokouta/react-logger@1.0.1","maintainers":[{"name":"abdokouta","email":"akouta66@gmail.com"}],"homepage":"https://github.com/abdokouta/logger#readme","bugs":{"url":"https://github.com/abdokouta/logger/issues"},"dist":{"shasum":"5bff5ac5abb03722124248d8e9101929e823fac4","tarball":"https://registry.npmjs.org/@abdokouta/react-logger/-/react-logger-1.0.1.tgz","fileCount":10,"integrity":"sha512-dvBaXhVHNwIcELiZ6ROotk9RfMGdxyd/XRIA2nCyletG9RvHPEdVbd2mLtzVIcOOEYueEb0i+YdoNNZfiPPcNQ==","signatures":[{"sig":"MEYCIQDuBYNeuqbXWcaWgju2wDk50yh6GWIATHviTqizyp0rwQIhAJUCX2CuX0wI8/Krp0JuVZ/cbUx5ifLLKh6tQ+KzG5fz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":256469},"main":"./dist/index.js","type":"module","_from":"file:abdokouta-react-logger-1.0.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0","pnpm":">=9.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","lint":"eslint . --max-warnings 0","test":"vitest run","build":"tsup","clean":"rm -rf dist node_modules/.cache","format":"prettier --write .","release":"pnpm publish --access public --no-git-checks","lint:fix":"eslint . --fix","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"prettier --check .","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"abdokouta","email":"akouta66@gmail.com"},"_resolved":"/private/var/folders/7_/q437v6xs4sqf5p4755wbbzvh0000gn/T/ae88e12f2624f4efbd70969f23ca2e9a/abdokouta-react-logger-1.0.1.tgz","_integrity":"sha512-dvBaXhVHNwIcELiZ6ROotk9RfMGdxyd/XRIA2nCyletG9RvHPEdVbd2mLtzVIcOOEYueEb0i+YdoNNZfiPPcNQ==","repository":{"url":"git+https://github.com/abdokouta/logger.git","type":"git","directory":"packages/logger"},"_npmVersion":"11.12.1","description":"Flexible logging system with multiple formatters and transporters for React","directories":{},"sideEffects":false,"_nodeVersion":"22.22.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","jsdom":"^29.0.1","react":"^19.2.4","eslint":"^10.1.0","vitest":"^4.1.2","prettier":"^3.8.1","@vitest/ui":"^4.1.2","typescript":"6.0.2","@types/node":"^25.5.0","@types/react":"^19.2.14","@abdokouta/react-di":"^2.0.0","@nesvel/tsup-config":"^1.0.3","@nesvel/eslint-config":"^1.0.5","@nesvel/prettier-config":"^1.0.3","@nesvel/typescript-config":"^1.0.4"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","@abdokouta/react-di":"^2.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"@abdokouta/react-di":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/react-logger_1.0.1_1774952674536_0.06742626224316872","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@abdokouta/react-logger","version":"1.1.1","keywords":["react","logger","logging","console","transport","formatter","dependency-injection","di"],"author":{"url":"https://github.com/abdokouta","name":"Abdelrhman Kouta","email":"abdelrhman@pixielity.com"},"license":"MIT","_id":"@abdokouta/react-logger@1.1.1","maintainers":[{"name":"abdokouta","email":"akouta66@gmail.com"}],"homepage":"https://github.com/abdokouta/react-logger#readme","bugs":{"url":"https://github.com/abdokouta/react-logger/issues"},"dist":{"shasum":"555b26e25c63033c08585f6bd3e8d868302f5415","tarball":"https://registry.npmjs.org/@abdokouta/react-logger/-/react-logger-1.1.1.tgz","fileCount":10,"integrity":"sha512-ce4bLuN15YcS8hSsZRXQO/dt7zy9nB4Yv6gajZJZnP21P9WID4oiVqWJvdOva62MWACa6jE0DBOB6syhZoXQPw==","signatures":[{"sig":"MEQCIGb3r70Gjlq4JhAJI/xpi1TmXdhVZfMVW1Wl2YU1VcKwAiAzOdSN7IBSDy93Xjlz1KQiBn0qyV3NVqcRq4V1ASeH0g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":233019},"main":"./dist/index.js","type":"module","_from":"file:abdokouta-react-logger-1.1.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0","pnpm":">=9.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","lint":"eslint . --max-warnings 0","test":"vitest run","build":"tsup","clean":"rm -rf dist node_modules/.cache","format":"prettier --write .","release":"pnpm publish --access public --no-git-checks","lint:fix":"eslint . --fix","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"prettier --check .","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"abdokouta","email":"akouta66@gmail.com"},"_resolved":"/private/var/folders/7_/q437v6xs4sqf5p4755wbbzvh0000gn/T/caccde6d38f2830f661bbfcae4701117/abdokouta-react-logger-1.1.1.tgz","_integrity":"sha512-ce4bLuN15YcS8hSsZRXQO/dt7zy9nB4Yv6gajZJZnP21P9WID4oiVqWJvdOva62MWACa6jE0DBOB6syhZoXQPw==","repository":{"url":"git+https://github.com/abdokouta/react-logger.git","type":"git","directory":"packages/logger"},"_npmVersion":"10.9.7","description":"Flexible logging system with multiple formatters and transporters for React","directories":{},"sideEffects":false,"_nodeVersion":"22.22.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","jsdom":"^29.0.1","react":"^19.2.4","eslint":"^10.2.0","vitest":"^4.1.2","prettier":"^3.8.1","@eslint/js":"10.0.1","@vitest/ui":"^4.1.2","typescript":"6.0.2","@types/node":"^25.5.2","@types/react":"^19.2.14","typescript-eslint":"^8.58.0","@nesvel/tsup-config":"^1.0.3","eslint-plugin-turbo":"^2.9.4","@nesvel/eslint-config":"^1.0.5","@abdokouta/ts-container":"^1.2.1","@nesvel/prettier-config":"^1.0.3","@abdokouta/react-support":"^2.1.0","@nesvel/typescript-config":"^1.0.4","@abdokouta/ts-container-react":"^1.2.1"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","@abdokouta/ts-container":"^1.2.0","@abdokouta/react-support":"^2.1.0"},"peerDependenciesMeta":{"react":{"optional":true},"@abdokouta/ts-container":{"optional":false},"@abdokouta/react-support":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/react-logger_1.1.1_1775459798686_0.626690204902353","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@abdokouta/react-logger","version":"1.1.2","description":"Flexible logging system with multiple formatters and transporters for React","license":"MIT","author":{"name":"Abdelrhman Kouta","email":"abdelrhman@pixielity.com","url":"https://github.com/abdokouta"},"repository":{"type":"git","url":"git+https://github.com/abdokouta/react-logger.git","directory":"packages/logger"},"bugs":{"url":"https://github.com/abdokouta/react-logger/issues"},"homepage":"https://github.com/abdokouta/react-logger#readme","keywords":["react","logger","logging","console","transport","formatter","dependency-injection","di"],"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","peerDependencies":{"@abdokouta/ts-container":"^1.2.0","@abdokouta/react-support":"^2.1.0","react":"^18.0.0 || ^19.0.0"},"peerDependenciesMeta":{"@abdokouta/ts-container":{"optional":false},"@abdokouta/react-support":{"optional":false},"react":{"optional":true}},"devDependencies":{"@abdokouta/react-support":"^2.1.0","@abdokouta/ts-container-react":"^1.2.1","@abdokouta/ts-container":"^1.2.1","@eslint/js":"10.0.1","@nesvel/eslint-config":"^1.0.5","@nesvel/prettier-config":"^1.0.3","@nesvel/tsup-config":"^1.0.3","@nesvel/typescript-config":"^1.0.4","@types/node":"^25.5.2","@types/react":"^19.2.14","@vitest/ui":"^4.1.2","eslint":"^10.2.0","eslint-plugin-turbo":"^2.9.4","jsdom":"^29.0.1","prettier":"^3.8.1","react":"^19.2.4","tsup":"^8.5.1","typescript":"6.0.2","typescript-eslint":"^8.58.0","vitest":"^4.1.2"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"engines":{"node":">=18.0.0","pnpm":">=9.0.0"},"sideEffects":false,"scripts":{"build":"tsup","dev":"tsup --watch","clean":"rm -rf dist node_modules/.cache","typecheck":"tsc --noEmit","lint":"eslint . --max-warnings 0","lint:fix":"eslint . --fix","format":"prettier --write .","format:check":"prettier --check .","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","release":"pnpm publish --access public --no-git-checks"},"_id":"@abdokouta/react-logger@1.1.2","_integrity":"sha512-BXG2NVcYKV5PvqiiQOhvODye2ImbF0p5sxUMDtz2e5FqajxUYk9cFEE6GyBv3YRjpMUSQnHvf52+n7Muem94Dw==","_resolved":"/private/var/folders/7_/q437v6xs4sqf5p4755wbbzvh0000gn/T/0903c81a92880b8b6827d34189a709e0/abdokouta-react-logger-1.1.2.tgz","_from":"file:abdokouta-react-logger-1.1.2.tgz","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-BXG2NVcYKV5PvqiiQOhvODye2ImbF0p5sxUMDtz2e5FqajxUYk9cFEE6GyBv3YRjpMUSQnHvf52+n7Muem94Dw==","shasum":"d805e6b997a72bd26be1790a3f4da5d74231b0b3","tarball":"https://registry.npmjs.org/@abdokouta/react-logger/-/react-logger-1.1.2.tgz","fileCount":10,"unpackedSize":236022,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCZDSAVdST8vUl8Sp2fAP/tZXWJcPh25SYfPrpeBqHwtAIgbuh0MvsbYb7DWSkiu4BKFjQfUnC6VlEWAKgyID0/30M="}]},"_npmUser":{"name":"abdokouta","email":"akouta66@gmail.com"},"directories":{},"maintainers":[{"name":"abdokouta","email":"akouta66@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-logger_1.1.2_1775461319047_0.6702921290552557"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-31T06:16:35.595Z","modified":"2026-04-06T07:41:59.329Z","1.0.0":"2026-03-31T06:16:35.883Z","1.0.1":"2026-03-31T10:24:34.740Z","1.1.0":"2026-04-06T07:15:04.577Z","1.1.1":"2026-04-06T07:16:38.824Z","1.1.2":"2026-04-06T07:41:59.200Z"},"bugs":{"url":"https://github.com/abdokouta/react-logger/issues"},"author":{"name":"Abdelrhman Kouta","email":"abdelrhman@pixielity.com","url":"https://github.com/abdokouta"},"license":"MIT","homepage":"https://github.com/abdokouta/react-logger#readme","keywords":["react","logger","logging","console","transport","formatter","dependency-injection","di"],"repository":{"type":"git","url":"git+https://github.com/abdokouta/react-logger.git","directory":"packages/logger"},"description":"Flexible logging system with multiple formatters and transporters for React","maintainers":[{"name":"abdokouta","email":"akouta66@gmail.com"}],"readme":"# @abdokouta/react-logger\n\nMulti-channel logging system for React with DI integration. Built on `MultipleInstanceManager` from `@abdokouta/react-support`.\n\n## Install\n\n```bash\npnpm add @abdokouta/react-logger @abdokouta/react-support @abdokouta/ts-container\n```\n\n## Quick Start\n\n```typescript\n// 1. Configure\nimport { defineConfig, LogLevel, ConsoleTransporter, StorageTransporter, SilentTransporter } from '@abdokouta/react-logger';\n\nexport default defineConfig({\n  default: 'console',\n  channels: {\n    console: {\n      transporters: [new ConsoleTransporter({ level: LogLevel.Debug })],\n      context: { app: 'my-app' },\n    },\n    storage: {\n      transporters: [new StorageTransporter({ key: 'app-logs', maxEntries: 500 })],\n    },\n    silent: {\n      transporters: [new SilentTransporter()],\n    },\n  },\n});\n\n// 2. Register module\nimport { Module } from '@abdokouta/ts-container';\nimport { LoggerModule } from '@abdokouta/react-logger';\nimport loggerConfig from './config/logger.config';\n\n@Module({\n  imports: [LoggerModule.forRoot(loggerConfig)],\n})\nexport class AppModule {}\n\n// 3. Use in services\nimport { Injectable, Inject } from '@abdokouta/ts-container';\nimport { LoggerManager, LOGGER_MANAGER } from '@abdokouta/react-logger';\n\n@Injectable()\nexport class UserService {\n  constructor(@Inject(LOGGER_MANAGER) private logger: LoggerManager) {}\n\n  createUser(name: string) {\n    this.logger.channel().info('Creating user', { name });\n  }\n}\n\n// 4. Use in React\nimport { useLogger } from '@abdokouta/react-logger';\n\nfunction MyComponent() {\n  const logger = useLogger();\n  logger.info('Component rendered');\n  return <div>Hello</div>;\n}\n```\n\n## Architecture\n\n```\nLoggerManager extends MultipleInstanceManager<LoggerConfig>\n├── channel(name?) → LoggerService\n├── onModuleInit() → warm default\n└── onModuleDestroy() → cleanup\n\nLoggerService wraps channel transporters\n├── debug / info / warn / error / fatal\n├── withContext() / withoutContext()\n└── getTransporters()\n```\n\n## Transporters\n\n- `ConsoleTransporter` — browser console with colors, emoji, expandable context objects\n- `StorageTransporter` — localStorage with max entry limit\n- `SilentTransporter` — no-op for testing\n\n## Formatters\n\n- `PrettyFormatter` — colors + emoji (console default)\n- `JsonFormatter` — JSON (storage default)\n- `SimpleFormatter` — plain text\n\n## React Hooks\n\n- `useLogger(channelName?)` — get a LoggerService\n- `useLoggerContext(context, channelName?)` — auto-attach context on mount/unmount\n\n## DI Tokens\n\n- `LOGGER_CONFIG` — config object\n- `LOGGER_MANAGER` — useExisting alias to LoggerManager\n\n## License\n\nMIT\n","readmeFilename":"README.md"}