{"_id":"@danidoble/tracerlog","_rev":"1-d4fb36c2f979ac1e3e5255f507d02bb8","name":"@danidoble/tracerlog","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@danidoble/tracerlog","description":"Track your logs with a simple tracer using console as always","license":"MIT","main":"dist/tracer_log.js","author":{"name":"Daniel Sandoval","email":"ddanidoble@gmail.com","url":"https://github.com/danidoble"},"bugs":{"url":"https://github.com/danidoble/tracerlog/issues"},"homepage":"https://github.com/danidoble/tracerlog#readme","repository":{"url":"git+https://github.com/danidoble/tracerlog.git","type":"git"},"keywords":["console","tracker","tracer","danidoble","logger","module"],"private":false,"version":"0.0.1","type":"module","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"devDependencies":{"typescript":"^5.2.2","vite":"^5.0.8"},"_id":"@danidoble/tracerlog@0.0.1","gitHead":"3b8fc83514786e14d46c9f1a706bb41581ce7ad4","_nodeVersion":"18.19.0","_npmVersion":"10.2.5","dist":{"integrity":"sha512-c+L/Q3zhFrI4rwAocpJTJWsMwwFF9G/Jt6ifS/FQ3T3/zXvE5SeZownTmHZFgFTiumnubJkGD7pSNV0GBu+Y5w==","shasum":"e2d77fa726fa642ecd62b03dd64ed2926d2791f0","tarball":"https://registry.npmjs.org/@danidoble/tracerlog/-/tracerlog-0.0.1.tgz","fileCount":9,"unpackedSize":23431,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbKGNpVFbPazCpLLjT7fotq9whVPkggvxykev1BWYNXAIhAMysoNatp5Ubt8D1HJ/N7furGnbHCQqHTNh1pzEq66lT"}]},"_npmUser":{"name":"danidoble","email":"ddanidoble@gmail.com"},"directories":{},"maintainers":[{"name":"danidoble","email":"ddanidoble@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tracerlog_0.0.1_1705092436632_0.9465855566715609"},"_hasShrinkwrap":false},"0.0.2":{"name":"@danidoble/tracerlog","description":"Track your logs with a simple tracer using console as always","license":"MIT","main":"dist/tracer_log.js","author":{"name":"Daniel Sandoval","email":"ddanidoble@gmail.com","url":"https://github.com/danidoble"},"bugs":{"url":"https://github.com/danidoble/tracerlog/issues"},"homepage":"https://github.com/danidoble/tracerlog#readme","repository":{"url":"git+https://github.com/danidoble/tracerlog.git","type":"git"},"keywords":["console","tracker","tracer","danidoble","logger","module"],"private":false,"version":"0.0.2","type":"module","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"devDependencies":{"typescript":"^5.2.2","vite":"^5.0.8"},"_id":"@danidoble/tracerlog@0.0.2","gitHead":"15239ba1c7b6bf48e851b253eb80e0c0d00f71b0","_nodeVersion":"18.19.0","_npmVersion":"10.2.5","dist":{"integrity":"sha512-bJbYtkW35dJmqMpIOOMFrrDWZD5uJp3RXjMPtTn0utCxwZT96skVwX2nwgSnPapdmSOo6uCYuydX8Z2CwTrZVA==","shasum":"cf53c656d4c7433d7296ae020715b1e54608c10e","tarball":"https://registry.npmjs.org/@danidoble/tracerlog/-/tracerlog-0.0.2.tgz","fileCount":9,"unpackedSize":23304,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHkvZ5gX8qG4w+MjLmAKPHqP5iowHe9Ip4ozbewPxTxbAiBPDLrKOIXQ5aPcKJZvMSnFpL/Bs9IVVyrcrF49oK5rDA=="}]},"_npmUser":{"name":"danidoble","email":"ddanidoble@gmail.com"},"directories":{},"maintainers":[{"name":"danidoble","email":"ddanidoble@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tracerlog_0.0.2_1705101554621_0.7319279029515919"},"_hasShrinkwrap":false}},"time":{"created":"2024-01-12T20:47:16.531Z","0.0.1":"2024-01-12T20:47:16.787Z","modified":"2024-01-12T23:19:15.022Z","0.0.2":"2024-01-12T23:19:14.831Z"},"maintainers":[{"name":"danidoble","email":"ddanidoble@gmail.com"}],"description":"Track your logs with a simple tracer using console as always","homepage":"https://github.com/danidoble/tracerlog#readme","keywords":["console","tracker","tracer","danidoble","logger","module"],"repository":{"url":"git+https://github.com/danidoble/tracerlog.git","type":"git"},"author":{"name":"Daniel Sandoval","email":"ddanidoble@gmail.com","url":"https://github.com/danidoble"},"bugs":{"url":"https://github.com/danidoble/tracerlog/issues"},"license":"MIT","readme":"# TracerLog\n\nZero dependency library to trace the log in the console.\n\nTrace log for javascript console\nWhen you want to trace the log in the console, you can use this library.\nFor example, you can trace the log in the console like this.\n\n```javascript\nimport TracerLog from \"@danidoble/tracerlog\";\n\nconst tracer = new TracerLog();\ntracer.init();\n```\n\nOr if you want a common JS, you can do it like this.\n\n```javascript\n<script src=\"tracerlog.js\"></script>\n<script>\n    const tracer = new TracerLog();\n    tracer.init();\n</script>\n```\n\nSo you can use the console of the browser to see the log as always.\n\n```javascript\nconsole.log(\"Hello world\");\n```\n\nIf you want to get the current log, you can do it like this.\n\n```javascript\ntracer.data; // here are an array with the logs.\n```\n\nBy default, when the limit was reached, the log will dispatch an event of browser. So you can listen this event to save\nwith your own code.\n\n```javascript\ndocument.addEventListener(\"console:save\", function (event) {\n    // here you can save the log with your own code.\n});\n```\n\nBut if you want only one file with the log, you can use the property save_file.\n\n```javascript\ntracer.save_file = true;\n// when the limit was reached, the log will be saved in the file.\n```\n\nIf you want to change the limit of logs before call to save it, you can do it like this. (by default limit is 300)\n\n```javascript\ntracer.limit = 10;\n```\n\nIf you want disable the console but preserve trace\n\n```javascript\ntracer.console = false;\n```\n\nIf you want save the log when you want, you can do it like this.\n\n```javascript\ntracer.saveNow();\n```\n\nWhen the page is unloaded, the log will be saved automatically.\n\n```javascript\nwindow.location.reload();\n// before reload the page, the log will be saved.\n```","readmeFilename":"README.md"}