{"id":15471747,"url":"https://github.com/thadeu/logger-storage","last_synced_at":"2025-04-22T13:19:49.209Z","repository":{"id":57165758,"uuid":"132514100","full_name":"thadeu/logger-storage","owner":"thadeu","description":"Output console.log out of the box","archived":false,"fork":false,"pushed_at":"2019-05-31T22:12:15.000Z","size":572,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T13:19:40.704Z","etag":null,"topics":["console","logger-chrome","web-console"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thadeu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-07T20:40:02.000Z","updated_at":"2022-09-16T18:26:41.000Z","dependencies_parsed_at":"2022-08-30T15:21:21.115Z","dependency_job_id":null,"html_url":"https://github.com/thadeu/logger-storage","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thadeu%2Flogger-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thadeu%2Flogger-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thadeu%2Flogger-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thadeu%2Flogger-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thadeu","download_url":"https://codeload.github.com/thadeu/logger-storage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250246731,"owners_count":21398919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["console","logger-chrome","web-console"],"created_at":"2024-10-02T02:21:35.478Z","updated_at":"2025-04-22T13:19:49.183Z","avatar_url":"https://github.com/thadeu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# logger-storage\n\n[![NPM package version](https://img.shields.io/npm/v/@thadeu/logger-storage.svg)](https://www.npmjs.com/package/@thadeu/logger-storage)\n[![Build Status](https://travis-ci.org/thadeu/logger-storage.svg?branch=master)](https://travis-ci.org/thadeu/logger-storage)\n![Minified size](http://img.badgesize.io/thadeu/logger-storage/master/dist/logger-storage.min.js.svg?label=min+size)\n![Minified+Gzip size](http://img.badgesize.io/thadeu/logger-storage/master/dist/logger-storage.min.js.svg?compression=gzip\u0026label=min%2Bgzip+size)\n![License: MIT](https://img.shields.io/npm/l/@thadeu/logger-storage.svg)\n\nConsole.log out of the box.\n\n# Instalation\n\nThis lib is available as a NPM package. To install it, use the following command:\n\n```bash\nnpm install @thadeu/logger-storage --save\n```\n\nIf you're using Yarn (and you should):\n\n```bash\nyarn add @thadeu/logger-storage\n```\n\nIf you dont use ES6/7/8/x, use unpkg file\n\n[https://unpkg.com/@thadeu/logger-storage@0.1.12/dist/logger-storage.min.js](https://unpkg.com/@thadeu/logger-storage@0.1.12/dist/logger-storage.min.js)\n\n# API\n\n- sync -\u003e start process\n- logger -\u003e save to localStorage\n- all -\u003e get all logs\n- filter -\u003e filter logs\n- logs -\u003e filter only logs\n- errors -\u003e filter only errors\n- warns -\u003e filter only warns\n- infos -\u003e filter only infos\n- clear -\u003e clear storage\n\n## .sync({ ...options })\n\n#### auto_start\n\nType: `Boolean`\n\nDefault: true\n\n#### reloadClear\n\nType: `Boolean`\n\nDefault: true\n\n#### only\n\nType: `Array`\n\nDefault: ['error', 'info', 'log', 'warn']\n\n## Usage\n\n```js\nimport * as LoggerStorage from \"@thadeu/logger-storage\";\n```\n\n```js\nLoggerStorage.sync({\n  only: [\"error\"]\n});\n```\n\n## Get all logs\n\n```js\nLoggerStorage.all().then(items =\u003e {\n  console.log(items);\n});\n```\n\n## Get only logs\n\n```js\nLoggerStorage.logs().then(items =\u003e {\n  console.log(items);\n});\n```\n\n## Get only errors\n\n```js\nLoggerStorage.errors().then(items =\u003e {\n  console.log(items);\n});\n```\n\n## Get only warns\n\n```js\nLoggerStorage.warns().then(items =\u003e {\n  console.log(items);\n});\n```\n\n## Get only infos\n\n```js\nloggerStorage.infos().then(items =\u003e {\n  console.log(items);\n});\n```\n\n## Logger manually\n\n```js\nLoggerStorage.sync({\n  auto_start: false\n});\n\nLoggerStorage.logger(\"testing with logger storage\", {\n  type_event: \"log\", // 'error', 'info', 'log', 'warn'\n  timestamp: new Date()\n  // others custom attributes\n});\n```\n\n## Clear all logs\n\n```js\nLoggerStorage.clear();\n```\n\n## Do you developer?\n\n**starting project**\n\n```js\nnpm run start\n```\n\n**watching tests**\n\n```js\nnpm run test:watch\n```\n\nWe going to enjoy!!\n\n# Contributing\n\nOnce you've made your great commits (include tests, please):\n\n1. Fork this repository\n2. Create a topic branch - `git checkout -b my_branch`\n3. Push to your branch - `git push origin my_branch`\n4. Create a pull request\n\nThat's it!\n\nPlease respect the indentation rules and code style. And use 2 spaces, not tabs. And don't touch the version thing or distribution files; this will be made when a new version is going to be released.\n\n## License\n\n(The MIT License)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthadeu%2Flogger-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthadeu%2Flogger-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthadeu%2Flogger-storage/lists"}