{"_id":"@dagmawi222/logem","_rev":"4-5d6364f11ab99d887f0ca32057f12aa1","name":"@dagmawi222/logem","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@dagmawi222/logem","version":"1.0.0","keywords":["logger","react","react-native","typescript","api","error","logging"],"author":{"name":"Dagmawi Teka"},"license":"MIT","_id":"@dagmawi222/logem@1.0.0","maintainers":[{"name":"dagmawi222","email":"dagtt316@gmail.com"}],"dist":{"shasum":"937f12023c30390916e5b9b77c351b1006dc18df","tarball":"https://registry.npmjs.org/@dagmawi222/logem/-/logem-1.0.0.tgz","fileCount":6,"integrity":"sha512-no7mXxV1wFSZZnHSXZ30hGHt7RYO2QHPYfmBWD6g4xhp5oHh24jq49dcjjQZjerug9fRWxJpt97gamacAGsc+A==","signatures":[{"sig":"MEQCIGsDqyD6El0PDzVrutMj5r28erHqTQsX8GI7qRwGKVxfAiAWsP3Z2INT1tO2+iH6tiPoBArxA3wBybm1CIqeZy8z8A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6976},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"8910ba76b904104826fc59759f35e64e9545e221","scripts":{"dev":"tsup src/index.ts --watch --format cjs,esm --dts --out-dir dist","build":"tsup src/index.ts --format cjs,esm --dts --out-dir dist","clean":"rm -rf dist","prepare":"npm run build"},"_npmUser":{"name":"dagmawi222","email":"dagtt316@gmail.com"},"_npmVersion":"10.9.2","description":"A tiny logging library for React and React Native applications, with TypeScript support.","directories":{},"_nodeVersion":"23.9.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/logem_1.0.0_1752737859548_0.10232479791472548","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@dagmawi222/logem","version":"1.0.1","keywords":["logger","react","react-native","typescript","api","error","logging"],"author":{"name":"Dagmawi Teka"},"license":"MIT","_id":"@dagmawi222/logem@1.0.1","maintainers":[{"name":"dagmawi222","email":"dagtt316@gmail.com"}],"dist":{"shasum":"47e744e332c2f1c1967420e37fa0c7ea5fa3e138","tarball":"https://registry.npmjs.org/@dagmawi222/logem/-/logem-1.0.1.tgz","fileCount":6,"integrity":"sha512-RhOnMTf26aOe4wT1TxIPmSuUgjXlFzfcbgCev6dRZ6D+6FaiwTKJPpqR7Cnd4q0EIK1dFlJJqmRICrQndAFRpA==","signatures":[{"sig":"MEYCIQCUaT+FL4S7L2EdPLTXK1c+0YH4PAoIp5ID7EK1atLrpAIhAPO3sHzaJ6PtPc/CmAY1mgQs/jFTQ4PA+75Jf98YJPhf","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6982},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"2abdd2f4b97f5b2caac7330b642bd4ef1105ae09","scripts":{"dev":"tsup src/index.ts --watch --format cjs,esm --dts --out-dir dist","build":"tsup src/index.ts --format cjs,esm --dts --out-dir dist","clean":"rm -rf dist","prepare":"npm run build"},"_npmUser":{"name":"dagmawi222","email":"dagtt316@gmail.com"},"_npmVersion":"10.9.2","description":"A tiny logging library for React and React Native applications, with TypeScript support.","directories":{},"_nodeVersion":"23.9.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/logem_1.0.1_1752738186676_0.7561759301572195","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@dagmawi222/logem","version":"1.0.2","keywords":["logger","react","react-native","typescript","api","error","logging"],"author":{"name":"Dagmawi Teka"},"license":"MIT","_id":"@dagmawi222/logem@1.0.2","maintainers":[{"name":"dagmawi222","email":"dagtt316@gmail.com"}],"homepage":"https://github.com/Dagmawi-22/logem#readme","bugs":{"url":"https://github.com/Dagmawi-22/logem/issues"},"dist":{"shasum":"d1bc90e6df0d1e7f9bd0bbe0579dc0a897324dc7","tarball":"https://registry.npmjs.org/@dagmawi222/logem/-/logem-1.0.2.tgz","fileCount":6,"integrity":"sha512-5GJe6x17OTWrIidZ6PuRHO6OSVjh58+9EQsERA9Kr0JLgPQEPq3J/92HQUMHibuDLSh77Qj8L1WBD3D7rp5CKQ==","signatures":[{"sig":"MEUCICIkVifxjHyMyoeMg+wOKMds29id5AeHIHNXCGbLQvkTAiEAhHZ+zzGdeV91CmJI/CTn1gbiJyySjXKqOKN628VdWbM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13558},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"56f5bf0abddba93dce373f5210f050a03cab1200","scripts":{"dev":"tsup src/index.ts --watch --format cjs,esm --dts --out-dir dist","build":"tsup src/index.ts --format cjs,esm --dts --out-dir dist","clean":"rm -rf dist","prepare":"npm run build"},"_npmUser":{"name":"dagmawi222","email":"dagtt316@gmail.com"},"repository":{"url":"git+https://github.com/Dagmawi-22/logem.git","type":"git"},"_npmVersion":"10.9.2","description":"A tiny logging library for React and React Native applications, with TypeScript support.","directories":{},"_nodeVersion":"23.11.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0","@types/node":"^24.0.15"},"_npmOperationalInternal":{"tmp":"tmp/logem_1.0.2_1753101895710_0.1580754076122428","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@dagmawi222/logem","version":"1.0.3","description":"A tiny logging library for React and React Native applications, with TypeScript support.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --out-dir dist","dev":"tsup src/index.ts --watch --format cjs,esm --dts --out-dir dist","clean":"rm -rf dist","prepare":"npm run build"},"keywords":["logger","react","react-native","typescript","api","error","logging"],"author":{"name":"Dagmawi Teka"},"repository":{"type":"git","url":"git+https://github.com/Dagmawi-22/logem.git"},"license":"MIT","devDependencies":{"@types/node":"^24.0.15","tsup":"^8.0.0","typescript":"^5.0.0"},"_id":"@dagmawi222/logem@1.0.3","gitHead":"17bd08dbcce7354d1acdba05828c24e51d0ca037","bugs":{"url":"https://github.com/Dagmawi-22/logem/issues"},"homepage":"https://github.com/Dagmawi-22/logem#readme","_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-XP2t0D5qtqeH7djNlrkvfTm/N3BDjZ+HqI9n7XvzbOAaaZXTYiJvHx9peblnMXDqxdjVZEbM5Ha+Zn+FCK/6ZQ==","shasum":"380892127e27ada3815ae5d1ec31b90c98bd2928","tarball":"https://registry.npmjs.org/@dagmawi222/logem/-/logem-1.0.3.tgz","fileCount":6,"unpackedSize":13583,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFAGlPAaZy4YXDRzFPUkI0+MNeag6HWUFQfjBhYk6qSWAiBSYemdXC7/LUDLIC/6VhKbg2em2hzmeulcEmk2qwhJlA=="}]},"_npmUser":{"name":"dagmawi222","email":"dagtt316@gmail.com"},"directories":{},"maintainers":[{"name":"dagmawi222","email":"dagtt316@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/logem_1.0.3_1753104123606_0.6031330477211629"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-17T07:37:39.443Z","modified":"2025-07-21T13:22:04.018Z","1.0.0":"2025-07-17T07:37:39.743Z","1.0.1":"2025-07-17T07:43:06.838Z","1.0.2":"2025-07-21T12:44:55.918Z","1.0.3":"2025-07-21T13:22:03.812Z"},"bugs":{"url":"https://github.com/Dagmawi-22/logem/issues"},"author":{"name":"Dagmawi Teka"},"license":"MIT","homepage":"https://github.com/Dagmawi-22/logem#readme","keywords":["logger","react","react-native","typescript","api","error","logging"],"repository":{"type":"git","url":"git+https://github.com/Dagmawi-22/logem.git"},"description":"A tiny logging library for React and React Native applications, with TypeScript support.","maintainers":[{"name":"dagmawi222","email":"dagtt316@gmail.com"}],"readme":"# logem\n\nA minimal logger for React, React Native, and Node.js apps. Logs console messages, API request outcomes, and errors. Disabled by default in production.\n\n## Features\n\n- Logs to both console and a log file (with timestamps, Laravel-style)\n- Global error capturing (Sentry-style): logs all uncaught exceptions and unhandled promise rejections by default\n- Configurable log file location\n- Easy to enable/disable features via config\n\n## Installation\n\n```bash\nnpm install @dagmawi222/logem\n```\n\n## Example\n\n```js\nimport {\n  initLogger,\n  log,\n  warn,\n  error,\n  logApiRequest,\n  logError,\n} from \"@dagmawi222/logem\";\n\ninitLogger({\n  enabled: true,\n  environment: process.env.NODE_ENV, // 'dev', 'prod', etc.\n  logApi: true,\n  logErrors: true,\n  logFilePath: \"logs.txt\", // (optional) defaults to 'logs.txt' in your project root\n  globalErrorHandling: true, // (optional) enable/disable global error logging (default: true)\n});\n\nlog(\"App started\");\nwarn(\"Something might be off\");\nerror(\"Something failed\");\n\nlogApiRequest(\"/api/user\", \"GET\", 200, true, 120); // url, method, status, success, duration(ms)\n\ntry {\n  throw new Error(\"Something went wrong\");\n} catch (err) {\n  logError(\"User fetch failed\", err);\n}\n```\n\n## Log File Location\n\n- By default, logs are written to `logs.txt` in your project root (where you run your app).\n- You can change the log file location by setting `logFilePath` in `initLogger`.\n\n## Global Error Logging\n\n- By default, all uncaught exceptions and unhandled promise rejections are logged to the file and console.\n- To disable this, set `globalErrorHandling: false` in `initLogger`.\n\n---\n","readmeFilename":"README.md"}