[
  {
    "path": ".all-contributorsrc",
    "content": "{\n\t\"projectName\": \"ptkdev-logger\",\n\t\"projectOwner\": \"ptkdev\",\n\t\"repoType\": \"github\",\n\t\"repoHost\": \"https://github.com\",\n\t\"files\": [\n\t\t\"README.md\"\n\t],\n\t\"imageSize\": 100,\n\t\"commit\": true,\n\t\"contributors\": [\n\t\t{\n\t\t\t\"login\": \"ptkdev\",\n\t\t\t\"name\": \"Patryk Rzucidło\",\n\t\t\t\"avatar_url\": \"https://avatars1.githubusercontent.com/u/442844?v=4\",\n\t\t\t\"profile\": \"https://ptk.dev\",\n\t\t\t\"contributions\": [\n\t\t\t\t\"code\",\n\t\t\t\t\"translation\",\n\t\t\t\t\"doc\",\n\t\t\t\t\"bug\"\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"login\": \"agoalofalife\",\n\t\t\t\"name\": \"Ilua Chubarov\",\n\t\t\t\"avatar_url\": \"https://avatars1.githubusercontent.com/u/15719824?v=4\",\n\t\t\t\"profile\": \"https://github.com/agoalofalife\",\n\t\t\t\"contributions\": [\n\t\t\t\t\"code\"\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"login\": \"Bruck1701\",\n\t\t\t\"name\": \"Bruno Kümmel\",\n\t\t\t\"avatar_url\": \"https://avatars2.githubusercontent.com/u/17711277?v=4\",\n\t\t\t\"profile\": \"https://github.com/Bruck1701\",\n\t\t\t\"contributions\": [\n\t\t\t\t\"code\",\n\t\t\t\t\"translation\"\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"login\": \"alinaosv\",\n\t\t\t\"name\": \"Alina Osv\",\n\t\t\t\"avatar_url\": \"https://avatars3.githubusercontent.com/u/60554247?v=4\",\n\t\t\t\"profile\": \"https://github.com/alinaosv\",\n\t\t\t\"contributions\": [\n\t\t\t\t\"translation\"\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"login\": \"Syltech\",\n\t\t\t\"name\": \"Sylvain Téchené\",\n\t\t\t\"avatar_url\": \"https://avatars1.githubusercontent.com/u/3882925?v=4\",\n\t\t\t\"profile\": \"https://github.com/Syltech\",\n\t\t\t\"contributions\": [\n\t\t\t\t\"translation\"\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"login\": \"GiovanniCardamone\",\n\t\t\t\"name\": \"Giovanni Cardamone\",\n\t\t\t\"profile\": \"https://github.com/giovannicardamone\",\n\t\t\t\"avatar_url\": \"https://avatars1.githubusercontent.com/u/5117748?v=4\",\n\t\t\t\"contributions\": [\n\t\t\t\t\"code\"\n\t\t\t]\n\t\t}\n\t],\n\t\"contributorsPerLine\": 6,\n\t\"commitConvention\": \"none\"\n}"
  },
  {
    "path": ".editorconfig",
    "content": "# EditorConfig is awesome: https://EditorConfig.org\n\nroot = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\ninsert_final_newline = false\ntrim_trailing_whitespace = true\nindent_style = tab\nindent_size = 4\n\n[*.py]\nindent_style = space\nindent_size = 4"
  },
  {
    "path": ".eslintrc.json",
    "content": "{\n\t\"env\": {\n\t\t\"browser\": true,\n\t\t\"es6\": true,\n\t\t\"node\": true,\n\t\t\"jest/globals\": true\n\t},\n\t\"extends\": \"eslint:recommended\",\n\t\"parserOptions\": {\n\t\t\"sourceType\": \"module\",\n\t\t\"ecmaVersion\": 2019\n\t},\n\t\"plugins\": [\n\t\t\"jsdoc\",\n\t\t\"jest\"\n\t],\n\t\"settings\": {\n\t\t\"jsdoc\": {\n\t\t\t\"tagNamePreference\": {\n\t\t\t\t\"returns\": \"return\"\n\t\t\t}\n\t\t}\n\t},\n\t\"rules\": {\n\t\t\"no-multi-spaces\": [\"error\", { \"ignoreEOLComments\": true, \"exceptions\": { \"VariableDeclarator\": true } }],\n\t\t\"block-spacing\": [\"error\", \"always\"],\n\t\t\"array-bracket-spacing\": [\"error\", \"never\"],\n\t\t\"space-in-parens\": [\"error\", \"never\"],\n\t\t\"comma-spacing\": [\"error\", { \"before\": false, \"after\": true }],\n\t\t\"key-spacing\": [\"error\", { \"afterColon\": true, \"beforeColon\": false }],\n\t\t\"indent\": [\"error\", \"tab\", { \"SwitchCase\": 1 }],\n\t\t\"quotes\": [\"error\",\"double\", { \"avoidEscape\": true, \"allowTemplateLiterals\": true}],\n\t\t\"semi\": [\"error\", \"always\"],\n\t\t\"no-console\": [\"warn\"],\n\t\t\"no-constant-condition\": [\"warn\"],\n\t\t\"curly\": [\"error\", \"all\"],\n\t\t\"brace-style\": [\"error\", \"1tbs\", { \"allowSingleLine\": false }],\n\t\t\"keyword-spacing\": [\"error\", { \"before\": true, \"after\": true }],\n\t\t\"object-curly-spacing\": [\"error\", \"never\"],\n\t\t\"no-mixed-spaces-and-tabs\": [\"error\", \"smart-tabs\"],\n\t\t\"spaced-comment\": [2, \"always\"],\n\t\t\"space-before-blocks\": [\"error\", \"always\"],\n\t\t\"space-before-function-paren\": [\"error\", \"never\"],\n\t\t\"prefer-template\": \"error\",\n\t\t\"no-useless-concat\": \"error\",\n\t\t\"prefer-arrow-callback\": [\"error\", { \"allowNamedFunctions\": true }],\n\t\t\"linebreak-style\": [\"error\", \"unix\"],\n\t\t\"template-curly-spacing\": [\"error\", \"never\"],\n\t\t\"no-multiple-empty-lines\": [\"error\", { \"max\": 1, \"maxEOF\": 0 }],\n\t    \"jest/no-disabled-tests\": \"warn\",\n\t    \"jest/no-focused-tests\": \"error\",\n\t    \"jest/no-identical-title\": \"error\",\n\t    \"jest/prefer-to-have-length\": \"warn\",\n\t\t\"jest/valid-expect\": \"error\",\n\t\t\"jsdoc/require-param\": 1,\n\t\t\"jsdoc/require-param-description\": 1,\n\t\t\"jsdoc/require-param-name\": 1,\n\t\t\"jsdoc/require-param-type\": 1,\n\t\t\"jsdoc/require-returns\": 1,\n\t\t\"jsdoc/require-returns-description\": 1,\n\t\t\"jsdoc/require-returns-type\": 1,\n\t\t\"jsdoc/require-returns-check\": 1,\n\t\t\"jsdoc/require-hyphen-before-param-description\": 1\n\t}\n}"
  },
  {
    "path": ".gitattributes",
    "content": "## AUTO-DETECT\n* text=auto\n\n## SOURCE CODE\n*.bat      text eol=crlf\n*.css      text eol=lf\n*.html     text diff=html eol=lf\n*.ini      text eol=crlf\n*.js       text eol=lf\n*.json     text eol=lf\n*.php      text diff=php eol=lf\n*.py       text diff=python eol=lf\n*.rb       text diff=ruby\n*.sass     text eol=lf\n*.scss     text eol=lf\n*.sh       text eol=lf\n*.sql      text eol=lf\n*.ts       text eol=lf\n*.vue      text eol=lf\n*.xml      text eol=lf\n*.xhtml    text diff=html eol=lf\n\n## DOCKER\n*.dockerignore text eol=lf\nDockerfile     text eol=lf\n\n## DOCUMENTATION\n*.md         text eol=lf\n*.txt        text eol=lf\nAUTHORS      text eol=lf\nCHANGELOG    text eol=lf\nCHANGES      text eol=lf\nCONTRIBUTING text eol=lf\nCOPYING      text eol=lf\nINSTALL      text eol=lf\nlicense      text eol=lf\nLICENSE      text eol=lf\nNEWS         text eol=lf\nREADME       text eol=lf\nTODO         text eol=lf\n\n## TEMPLATES\n*.dot        text eol=lf\n*.tpl        text eol=lf\n*.twig       text eol=lf\n\n## LINTERS\n.csslintrc    text eol=lf\n.eslintrc     text eol=lf\n.htmlhintrc   text eol=lf\n.jscsrc       text eol=lf\n.jshintrc     text eol=lf\n.jshintignore text eol=lf\n.stylelintrc  text eol=lf\n.npmignore    text eol=lf\n\n## CONFIGS\n*.bowerrc      text eol=lf\n*.cnf          text eol=lf\n*.conf         text eol=lf\n*.config       text eol=lf\n.babelrc       text eol=lf\n.browserslistrc    text eol=lf\n.editorconfig  text eol=lf\n.env           text eol=lf\n.gitattributes text eol=lf\n.gitconfig     text eol=lf\n.htaccess      text eol=lf\n*.lock         text eol=lf\n*.npmignore    text eol=lf\n*.yaml         text eol=lf\n*.yml          text eol=lf\nbrowserslist   text eol=lf\nMakefile       text eol=lf\nmakefile       text eol=lf\n\n## GRAPHICS\n*.ai   binary\n*.bmp  binary\n*.eps  binary\n*.gif  binary\n*.ico  binary\n*.jng  binary\n*.jp2  binary\n*.jpg  binary\n*.jpeg binary\n*.jpx  binary\n*.jxr  binary\n*.pdf  binary\n*.png  binary\n*.psb  binary\n*.psd  binary\n*.svg  text\n*.svgz binary\n*.tif  binary\n*.tiff binary\n*.wbmp binary\n*.webp binary\n\n## AUDIO\n*.kar  binary\n*.m4a  binary\n*.mid  binary\n*.midi binary\n*.mp3  binary\n*.ogg  binary\n*.ra   binary\n\n## VIDEO\n*.3gpp binary\n*.3gp  binary\n*.as   binary\n*.asf  binary\n*.asx  binary\n*.fla  binary\n*.flv  binary\n*.m4v  binary\n*.mng  binary\n*.mov  binary\n*.mp4  binary\n*.mpeg binary\n*.mpg  binary\n*.ogv  binary\n*.swc  binary\n*.swf  binary\n*.webm binary\n\n## ARCHIVES\n*.7z  binary\n*.gz  binary\n*.jar binary\n*.rar binary\n*.tar binary\n*.zip binary\n\n## FONTS\n*.ttf   binary\n*.eot   binary\n*.otf   binary\n*.woff  binary\n*.woff2 binary\n\n## EXECUTABLES\n*.exe binary\n*.pyc binary"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "github: [ptkdev]\npatreon: ptkdev\nko_fi: ptkdev\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: 🐛 Bug report\nabout: Create a report to help us improve\n---\n\n<!-- Please search existing issues to avoid creating duplicates, remember before the title text add tag: [Bug report] -->\n\n### Versions\n\n<!-- Replace or update the values below with your own: -->\n\n- **Logger Version:** v1.0.0\n- **Node Version:** v13.0.0\n- **Operating System:** Windows 10\n- **Terminal:** Windows Powershell\n\n### Expected Behavior\n\n<!-- Please describe below this line the program's expected behavior. -->\n\n### Actual Behavior\n\n<!-- Please describe below this line the program's actual behavior. Please include any stack traces\nor log output in the back ticks below. -->\n\n### Steps to Reproduce\n\n<!-- Please describe below this line the steps for reproduce this issue, are numbered below. Include as\nmuch detail as possible. -->\n\n1. ...\n2. ...\n3. ...\n\n### Screenshots (Optional)\n\n<!-- If the error is graphical in nature it is helpful to provide a screenshot below this line. -->"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: 💫 Feature request\nabout: Suggest an idea for this project\n---\n\n<!-- Please search existing issues to avoid creating duplicates, remember before the title text add tag: [Feature request] -->\n\n### Feature description\n\n<!-- Describe below this line the feature you'd like -->\n\n### Feature motivation\n\n<!-- Why do you want this? Write motivation below this line -->"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/question.md",
    "content": "---\nname: 🗨 Question\nabout: Ask a question\n---\n\n<!-- Please search existing issues to avoid creating duplicates, remember before the title text add tag: [Q] -->\n\n### Question\n\n<!-- Describe below this line the question -->"
  },
  {
    "path": ".gitignore",
    "content": "######################################################################################\n# License:        MIT - http://opensource.org/licenses/MIT                           #\n# Author:         Patryk Rzucidło (@ptkdev) <support@ptkdev.io> https://ptk.dev    #\n# Original:       octocat - https://github.com/octocat                               #\n# Latest version: https://github.com/ptkdev/dotfiles                                 #\n######################################################################################\n\n# Compiled source #\n###################\n*.com\n*.class\n*.dll\n*.exe\n*.o\n*.so\n\n# Packages #\n############\n*.7z\n*.dmg\n*.gz\n*.iso\n*.jar\n*.rar\n*.tar\n*.zip\n\n# Eclipse #\n###########\n.classpath\n.project\n.settings\n.idea\n.idea/\n.metadata\n*.iml\n*.ipr\nproguard/\n\n# Logs and databases #\n######################\nlogs/*.log\nlogs/screenshots/*.png\nlogs/screenshots/*.jpg\nexamples/*.log\nexamples/*.json\ndatabases/*.db\ndatabases/*.sql\ndatabases/*.json\n*.log\n*.sql\n*.sqlite\n*.lock\n*.vscode\nyarn-debug.log\nyarn-error.log\n\n# OS generated files #\n######################\n.DS_Store\n.DS_Store?\n._*\n.Spotlight-V100\n.Trashes\nehthumbs.db\nThumbs.db\n\n# Python #\n##########\n*.pyc\n*.pyo\n\n# KDE/Linux generated files #\n#############################\n.directory\n\n# Backup generated files #\n##########################\n*~\n*.swp\n*.bak\n*#\n\n# Android #\n###########\n*.apk\n*.ap_\n*.dex\nbin/\ngen/\n.gradle/\nbuild/\nlocal.properties\n\n# Vagrant #\n###########\n/.vagrant\n\n# PHP #\n#######\n./config.php\nphpunit.xml\n/vendor\ncomposer.phar\n/bower_components\n\n# Runtime data #\n################\npids\n*.pid\n*.seed\n*.pid.lock\n*.eslintcache\n\n# NodeJS #\n##########\nnpm-debug.log\n/node_modules\n\n# App #\n#######\nplugins/*/\nconfig.js\nconfig/*.js\nconfigs/*.js\nloginpin.txt\nconfigs/loginpin.txt"
  },
  {
    "path": ".gitmodules",
    "content": ""
  },
  {
    "path": ".npmignore",
    "content": "# App #\n#######\nconfig/*.js\nconfigs/*.js\nconfigs/loginpin.txt\n.github\ndatabases/\ntests/\ndocs/\nlogs/\nexamples/\ndocker/\nDockerfile\nDockerfile.*\nloginpin.txt\n.gitmodules\n.jshintrc\n.gitattributes\n.eslintrc.json\n.editorconfig\n.pm2-process.json\n.all-contributorsrc\n.eslintcache\njsconfig.js"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# v1.8.0 (August 30, 2021)\n\n-   Fix: lowdb esm\n\n[![](https://img.shields.io/badge/donate-paypal-005EA6.svg?logo=paypal)](https://www.paypal.me/ptkdev) [![](https://img.shields.io/badge/donate-patreon-F87668.svg?logo=patreon)](https://www.patreon.com/ptkdev) [![](https://img.shields.io/badge/donate-sponsors-ea4aaa.svg?logo=github)](https://github.com/sponsors/ptkdev/) [![](https://img.shields.io/badge/donate-ko--fi-29abe0.svg?logo=ko-fi)](https://ko-fi.com/ptkdev)\n\n# v1.7.2 (August 19, 2020)\n\n-   Fix: Typescript export module\n\n# v1.7.1 (August 19, 2020)\n\n-   Fix: Typescript typization issues (#7)\n\n# v1.7.0 (August 05, 2020)\n\n-   Feature: typescript typization (Thanks: Giovanni Cardamone)\n\n# v1.6.0 (May 24, 2020)\n\n-   Fix: info color (default palette) changed from #2ECC71 to #4CAF50\n-   Fix: docs url with custom pallette\n-   Fix: stackoverflow url with custom pallette\n\n# v1.5.0 (May 20, 2020)\n\n-   Feature: logrotate\n-   Feature: palette: customize colors\n\n# v1.4.0 (May 11, 2020)\n\n-   Translations: 🇫🇷 (Thanks: Sylvain Téchené)\n\n# v1.3.0 (May 07, 2020)\n\n-   Translations: 🇷🇺 🇩🇪 (Thanks: Alina Osv)\n\n# v1.2.0 (May 06, 2020)\n\n-   Fix: security patch\n-   Translations: 🇪🇸 🇵🇹 (Thanks: Bruno Kummel)\n\n# v1.1.2 (March 28, 2020)\n\n-   Fix: security patch\n\n# v1.1.1 (March 08, 2020)\n\n-   Fix: default `option.type` value\n\n# v1.1.0 (March 08, 2020)\n\n-   Fix: misprint of `errors` in options and docs, renamed to `error`\n-   Fix: errors logs output moved to `stderr`\n-   Feature: new formats of logs files, available log (text) or (json)\n-   Compatibility: the JSON logs format is compatible with [pinojs](https://github.com/pinojs/pino) output\n\n# v1.0.0 (March 08, 2020)\n\n-   First Release.\n"
  },
  {
    "path": "LICENSE.md",
    "content": "## MIT License\n\n> Code and Contributions\n\nCopyright (c) 2020 Patryk Rzucidło (PTKDev)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n##### https://choosealicense.com/licenses/mit/\n\n## Creative Commons BY-NC 4.0 License\n\n> Images, assets and logos\n\nCopyleft (c) 2020 Patryk Rzucidło (PTKDev)\n\n#### You are free to:\n- Share — copy and redistribute the material in any medium or format\n- Adapt — remix, transform, and build upon the material\n\nThe licensor cannot revoke these freedoms as long as you follow the license terms.\n\n#### Under the following terms:\n- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that - suggests the licensor endorses you or your use.\n- NonCommercial — You may not use the material for commercial purposes.\n\nNo additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.\n\n##### https://creativecommons.org/licenses/by-nc/4.0/\n\n## Creative Commons BY 4.0 License\n\n> Documentation and Translations\n\nCopyleft (c) 2020 Patryk Rzucidło (PTKDev)\n\n#### You are free to:\n- Share — copy and redistribute the material in any medium or format\n- Adapt — remix, transform, and build upon the material for any purpose, even commercially.\n\nThe licensor cannot revoke these freedoms as long as you follow the license terms.\n\n#### Under the following terms:\n- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.\n\nNo additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.\n\n##### https://creativecommons.org/licenses/by/4.0/"
  },
  {
    "path": "README.md",
    "content": "[![Beautiful Logger for Node.js: the best alternative to the console.log statement](https://raw.githubusercontent.com/ptkdev/ptkdev-logger/nightly/.github/assets/ptkdev-logger-logo.png)](https://www.npmjs.com/package/@ptkdev/logger)\n\n# 🦒 Beautiful Logger for Node.js\n\n[![](https://img.shields.io/badge/version-v1.8.0-lightgrey.svg)](https://github.com/ptkdev/ptkdev-logger/releases) [![](https://img.shields.io/npm/v/@ptkdev/logger.svg)](https://www.npmjs.com/package/@ptkdev/logger) [![](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/ptkdev/ptkdev-logger/blob/master/LICENSE.md) [![](https://img.shields.io/badge/ES-9-F7DF1E.svg)](https://wikipedia.org/wiki/ECMAScript) [![](https://snyk.io/test/github/ptkdev/ptkdev-logger/badge.svg)](https://snyk.io/test/github/ptkdev/ptkdev-logger) [![](https://discordapp.com/api/guilds/383373985666301975/embed.png)](http://discord.ptkdev.io)\n\n> The best alternative to the console.log statement\n\n## 🎁 Support: Donate\n\n> This project is **free**, **open source** and I try to provide excellent **free support**. Why donate? I work on this project several hours in my spare time and try to keep it up to date and working. **THANK YOU!**\n\n[![](https://img.shields.io/badge/donate-paypal-005EA6.svg?logo=paypal)](https://www.paypal.me/ptkdev) [![](https://img.shields.io/badge/donate-patreon-F87668.svg?logo=patreon)](https://www.patreon.com/ptkdev) [![](https://img.shields.io/badge/donate-sponsors-ea4aaa.svg?logo=github)](https://github.com/sponsors/ptkdev/) [![](https://img.shields.io/badge/donate-ko--fi-29abe0.svg?logo=ko-fi)](https://ko-fi.com/ptkdev)\n\n![](https://img.shields.io/badge/bitcoin-35jQmZCy4nsxoMM3QPFrnZePDVhdKaHMRH-E38B29.svg?logo=bitcoin) ![](https://img.shields.io/badge/ethereum-0x8b8171661bEb032828e82baBb0B5B98Ba8fBEBFc-4E8EE9.svg?logo=ethereum)\n\n## 📎 Menu\n\n-   💡 [Features](#-features)\n-   👔 [Screenshot](#-screenshot)\n-   🚀 [How to use](#-installation)\n-   📚 [Documentation](#-documentation)\n-   -   🧰 [Options](#-options)\n-   -   🔌 [Methods](#-methods)\n-   -   🎨 [Palette](#-palette)\n-   -   🤹‍♂️ [LogRotate](#-logrotate)\n-   👨‍💻 [Contributing](#-contributing)\n-   🐛 [Known Bugs](https://github.com/ptkdev/ptkdev-logger/issues?q=is%3Aopen+is%3Aissue+label%3Abug)\n-   🍻 Community:\n    -   <img src=\"https://raw.githubusercontent.com/ptkdev/ptkdev-logger/master/.github/assets/social_discord.png\" height=\"18px\"> [Discord](http://discord.ptkdev.io) ([🇬🇧 English Channel](https://discord.gg/tWtqt4B) | [🇮🇹 Italian Channel](https://discord.gg/q29uZnm) | [🇵🇱 Polish Channel](https://discord.gg/akjuWJX))\n\n## 💡 Features\n\n-   [✔️] Easy to use\n-   [✔️] MIT License\n-   [✔️] Palette (🎨 Customize colors)\n-   [✔️] Logrotate 🤹‍♂️\n-   [✔️] Typescript support\n-   [✔️] The best alternative to the console.log statement\n-   [✔️] Write stdout logs to file (supported format: text/log and json)\n-   [✔️] The JSON logs format is compatible with [pinojs](https://github.com/pinojs/pino)\n-   [✔️] Translations: 🇬🇧 🇮🇹 🇵🇱 🇪🇸 🇵🇹 🇷🇺 🇩🇪 🇫🇷 (Help me ❤️)\n\n## 👔 Screenshot\n\n[![Beautiful Logger for Node.js](https://raw.githubusercontent.com/ptkdev/ptkdev-logger/nightly/.github/assets/screenshot/ptkdev-logger-screen1.png)](https://raw.githubusercontent.com/ptkdev/ptkdev-logger/nightly/.github/assets/screenshot/ptkdev-logger-screen1.png)\n\n## 🚀 Installation\n\n1. In your node project run: `npm install @ptkdev/logger --save`\n2. Usage:\n\n```javascript\nconst Logger = require(\"@ptkdev/logger\");\nconst logger = new Logger();\nlogger.info(\"message\");\n```\n\nYou can set `options` to `new Logger(options);` example:\n\n```javascript\nconst Logger = require(\"@ptkdev/logger\");\n\nconst options = {\n\tlanguage: \"en\",\n\tcolors: true,\n\tdebug: true,\n\tinfo: true,\n\twarning: true,\n\terror: true,\n\tsponsor: true,\n\twrite: true,\n\ttype: \"log\",\n\trotate: {\n\t\tsize: \"10M\",\n\t\tencoding: \"utf8\",\n\t},\n\tpath: {\n\t\t// remember: add string *.log to .gitignore\n\t\tdebug_log: \"./debug.log\",\n\t\terror_log: \"./errors.log\",\n\t},\n};\n\nconst logger = new Logger(options);\nlogger.info(\"message\");\n```\n\nSee folder `examples`, run with `node example.js`. Below is available a description of `options` values.\n\n## 🧰 Options\n\n| Parameter | Description                                             | Values                                | Default value                                               | Available since |\n| --------- | ------------------------------------------------------- | ------------------------------------- | ----------------------------------------------------------- | --------------- |\n| language  | Set language of log type                                | en / it / pl / es / pt / de / ru / fr | en                                                          | **v1.0.0**      |\n| colors    | Enable colors in terminal                               | true / enabled / false / disabled     | true                                                        | **v1.0.0**      |\n| debug     | Enable all logs with method debug                       | true / enabled / false / disabled     | true                                                        | **v1.0.0**      |\n| info      | Enable all logs with method info                        | true / enabled / false / disabled     | true                                                        | **v1.0.0**      |\n| warning   | Enable all logs with method warning                     | true / enabled / false / disabled     | true                                                        | **v1.0.0**      |\n| error     | Enable all logs with method errors                      | true / enabled / false / disabled     | true                                                        | **v1.0.0**      |\n| sponsor   | Enable all logs with method sponsor                     | true / enabled / false / disabled     | true                                                        | **v1.0.0**      |\n| write     | Write the logs into a file, you need set path values    | true / enabled / false / disabled     | false                                                       | **v1.0.0**      |\n| type      | Format of logs in files                                 | log / json                            | log                                                         | **v1.0.0**      |\n| rotate    | Rotates the log files when size exceeds this value      | `10B` / `10K` / `10M` / `10G`         | `\"rotate\": {\"size\": \"10M\"}`                                 | **v1.5.0**      |\n| palette   | Change palette with hexcode colors                      | [Object](#-palette)                   | default palette                                             | **v1.5.0**      |\n| path      | If write is true, the library writes the logs to a path | Object                                | `{\"debug_log\": \"./debug.log\", \"error_log\": \"./errors.log\"}` | **v1.0.0**      |\n\n## 🔌 Methods\n\n| Method                                              | Description                                                                                                                                            | Parameters                                                                                         |\n| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- |\n| **debug**(`message`, `tag`)                         | `message`: Display debug log message <br> `tag`: prefix of message                                                                                     | `message`: string (mandatory) <br> `tag`: string (optional)                                        |\n| **info**(`message`, `tag`)                          | `message`: Display info log message <br> `tag`: prefix of message                                                                                      | `message`: string (mandatory) <br> `tag`: string (optional)                                        |\n| **warning**(`message`, `tag`)                       | `message`: Display warning log message <br> `tag`: prefix of message                                                                                   | `message`: string (mandatory) <br> `tag`: string (optional)                                        |\n| **error**(`message`, `tag`)                         | `message`: Display errors log message <br> `tag`: prefix of message                                                                                    | `message`: string (mandatory) <br> `tag`: string (optional)                                        |\n| **sponsor**(`message`, `tag`)                       | `message`: Display sponsor log message <br> `tag`: prefix of message                                                                                   | `message`: string (mandatory) <br> `tag`: string (optional)                                        |\n| **stackoverflow**(`message`, `tag`, `error_string`) | `message`: Display stackoverflow log message <br> `tag`: prefix of message <br> `error_string`: query for stackoverflow, if empty we use message param | `message`: string (mandatory) <br> `tag`: string (optional) <br> `error_string`: string (optional) |\n| **docs**(`message`, `url`, `tag`)                   | `message`: Display docs log message <br> `url`: link of documentation <br> `tag`: prefix of message                                                    | `message`: string (mandatory) <br> `url`: string (optional) <br> `tag`: string (optional)          |\n\n## 🎨 Palette\n\n[![Beautiful Logger for Node.js](https://raw.githubusercontent.com/ptkdev/ptkdev-logger/nightly/.github/assets/screenshot/ptkdev-logger-palette.png)](https://raw.githubusercontent.com/ptkdev/ptkdev-logger/nightly/.github/assets/screenshot/ptkdev-logger-palette.png)\n\nYou can customize palette colors with Object `palette` and with hexcode values.\n\n-   `label` is text on left (INFORMATION / ERROR / DOCS, etc..)\n-   `text` is message of log on right\n-   `background` is background color on left side\n\n```javascript\n{\n\t...\n\t\"palette\": {\n\t\t\"info\": { // method name\n\t\t\t\"label\": \"#ffffff\", // label on left\n\t\t\t\"text\": \"#4CAF50\",  // log message\n\t\t\t\"background\": \"#4CAF50\" // background\n\t\t},\n\t\t\"warning\": {\n\t\t\t\"label\": \"#ffffff\",\n\t\t\t\"text\": \"#FF9800\",\n\t\t\t\"background\": \"#FF9800\"\n\t\t},\n\t\t\"error\": {\n\t\t\t\"label\": \"#ffffff\",\n\t\t\t\"text\": \"#FF5252\",\n\t\t\t\"background\": \"#FF5252\"\n\t\t},\n\t\t\"stackoverflow\": {\n\t\t\t\"label\": \"#ffffff\",\n\t\t\t\"text\": \"#9C27B0\",\n\t\t\t\"background\": \"#9C27B0\"\n\t\t},\n\t\t\"docs\": {\n\t\t\t\"label\": \"#ffffff\",\n\t\t\t\"text\": \"#FF4081\",\n\t\t\t\"background\": \"#FF4081\"\n\t\t},\n\t\t\"debug\": {\n\t\t\t\"label\": \"#ffffff\",\n\t\t\t\"text\": \"#1976D2\",\n\t\t\t\"background\": \"#1976D2\"\n\t\t},\n\t\t\"sponsor\": {\n\t\t\t\"label\": \"#ffffff\",\n\t\t\t\"text\": \"#607D8B\",\n\t\t\t\"background\": \"#607D8B\"\n\t\t},\n\t\t\"time\": {\n\t\t\t\"label\": \"#ffffff\",\n\t\t\t\"background\": \"#795548\"\n\t\t}\n\t}\n\t...\n}\n```\n\nSee folder `examples`, run with `node example.js`.\n\n## 🤹‍♂️ LogRotate\n\nRotates the file when size exceeds 10 megabytes (optional, default 10M - values: 10B (byte) / 10K (kilobyte)/ 10M (megabyte)/ 10G (gigabyte))\n\n```javascript\n...\n\"rotate\": {\n\t\"size\": \"10M\",\n\t\"encoding\": \"utf8\"\n},\n...\n```\n\n## 📚 Documentation\n\nRun `npm run docs`\n\n## 👑 Sponsors\n\nSupport this project by becoming a sponsor. 🙏 Become a sponsor on [patreon](https://www.patreon.com/join/ptkdev) or become top3 sponsor on [ko-fi](https://ko-fi.com/ptkdev). Your logo will show up here with a link to your website.\n\n[![](https://api.ptkdev.io/backers/sponsor1.png)](https://api.ptkdev.io/backers/sponsor1.html) [![](https://api.ptkdev.io/backers/sponsor2.png)](https://api.ptkdev.io/backers/sponsor2.html) [![](https://api.ptkdev.io/backers/sponsor-kofi1.png)](https://api.ptkdev.io/backers/sponsor-kofi1.html) [![](https://api.ptkdev.io/backers/sponsor-kofi2.png)](https://api.ptkdev.io/backers/sponsor-kofi2.html) [![](https://api.ptkdev.io/backers/sponsor-kofi3.png)](https://api.ptkdev.io/backers/sponsor-kofi3.html) [![](https://api.ptkdev.io/backers/sponsor3.png)](https://api.ptkdev.io/backers/sponsor3.html) [![](https://api.ptkdev.io/backers/sponsor4.png)](https://api.ptkdev.io/backers/sponsor4.html) [![](https://api.ptkdev.io/backers/sponsor5.png)](https://api.ptkdev.io/backers/sponsor5.html) [![](https://api.ptkdev.io/backers/sponsor6.png)](https://api.ptkdev.io/backers/sponsor6.html) [![](https://api.ptkdev.io/backers/sponsor7.png)](https://api.ptkdev.io/backers/sponsor7.html) [![](https://api.ptkdev.io/backers/sponsor8.png)](https://api.ptkdev.io/backers/sponsor8.html) [![](https://api.ptkdev.io/backers/sponsor9.png)](https://api.ptkdev.io/backers/sponsor9.html) [![](https://api.ptkdev.io/backers/sponsor10.png)](https://api.ptkdev.io/backers/sponsor10.html) [![](https://api.ptkdev.io/backers/sponsor11.png)](https://api.ptkdev.io/backers/sponsor11.html) [![](https://api.ptkdev.io/backers/sponsor12.png)](https://api.ptkdev.io/backers/sponsor12.html) [![](https://api.ptkdev.io/backers/sponsor13.png)](https://api.ptkdev.io/backers/sponsor13.html) [![](https://api.ptkdev.io/backers/sponsor14.png)](https://api.ptkdev.io/backers/sponsor14.html) [![](https://api.ptkdev.io/backers/sponsor15.png)](https://api.ptkdev.io/backers/sponsor15.html)\n\n## 🦄 Backers\n\nThank you to all our backers! 🙏 Become a backer on [patreon](https://www.patreon.com/join/ptkdev).\n\n[![](https://api.ptkdev.io/backers/backer1.png)](https://api.ptkdev.io/backers/backer1.html) [![](https://api.ptkdev.io/backers/backer2.png)](https://api.ptkdev.io/backers/backer2.html) [![](https://api.ptkdev.io/backers/backer3.png)](https://api.ptkdev.io/backers/backer3.html) [![](https://api.ptkdev.io/backers/backer4.png)](https://api.ptkdev.io/backers/backer4.html) [![](https://api.ptkdev.io/backers/backer5.png)](https://api.ptkdev.io/backers/backer5.html) [![](https://api.ptkdev.io/backers/backer6.png)](https://api.ptkdev.io/backers/backer6.html) [![](https://api.ptkdev.io/backers/backer7.png)](https://api.ptkdev.io/backers/backer7.html) [![](https://api.ptkdev.io/backers/backer8.png)](https://api.ptkdev.io/backers/backer8.html) [![](https://api.ptkdev.io/backers/backer9.png)](https://api.ptkdev.io/backers/backer9.html) [![](https://api.ptkdev.io/backers/backer10.png)](https://api.ptkdev.io/backers/backer10.html) [![](https://api.ptkdev.io/backers/backer11.png)](https://api.ptkdev.io/backers/backer11.html) [![](https://api.ptkdev.io/backers/backer12.png)](https://api.ptkdev.io/backers/backer12.html) [![](https://api.ptkdev.io/backers/backer13.png)](https://api.ptkdev.io/backers/backer13.html) [![](https://api.ptkdev.io/backers/backer14.png)](https://api.ptkdev.io/backers/backer14.html) [![](https://api.ptkdev.io/backers/backer15.png)](https://api.ptkdev.io/backers/backer15.html)\n\n## 👨‍💻 Contributing\n\nI ❤️ contributions! I will happily accept your pull request! Translations, grammatical corrections (GrammarNazi you are welcome! Yes my English is bad, sorry), etc... Do not be afraid, if the code is not perfect we will work together 👯 and remember to insert your name in `.all-contributorsrc` and `package.json` file.\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n  <tr>\n    <td align=\"center\"><a href=\"https://ptk.dev\"><img src=\"https://avatars1.githubusercontent.com/u/442844?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Patryk Rzucidło</b></sub></a><br /><a href=\"https://github.com/ptkdev/ptkdev-logger/commits?author=ptkdev\" title=\"Code\">💻</a> <a href=\"#translation-ptkdev\" title=\"Translation\">🌍</a> <a href=\"https://github.com/ptkdev/ptkdev-logger/commits?author=ptkdev\" title=\"Documentation\">📖</a> <a href=\"https://github.com/ptkdev/ptkdev-logger/issues?q=author%3Aptkdev\" title=\"Bug reports\">🐛</a></td>\n    <td align=\"center\"><a href=\"https://github.com/agoalofalife\"><img src=\"https://avatars1.githubusercontent.com/u/15719824?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Ilua Chubarov</b></sub></a><br /><a href=\"https://github.com/ptkdev/ptkdev-logger/commits?author=agoalofalife\" title=\"Code\">💻</a></td>\n    <td align=\"center\"><a href=\"https://github.com/Bruck1701\"><img src=\"https://avatars2.githubusercontent.com/u/17711277?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Bruno Kümmel</b></sub></a><br /><a href=\"https://github.com/ptkdev/ptkdev-logger/commits?author=Bruck1701\" title=\"Code\">💻</a> <a href=\"#translation-Bruck1701\" title=\"Translation\">🌍</a></td>\n    <td align=\"center\"><a href=\"https://github.com/alinaosv\"><img src=\"https://avatars3.githubusercontent.com/u/60554247?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Alina Osv</b></sub></a><br /><a href=\"#translation-alinaosv\" title=\"Translation\">🌍</a></td>\n    <td align=\"center\"><a href=\"https://github.com/Syltech\"><img src=\"https://avatars1.githubusercontent.com/u/3882925?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Sylvain Téchené</b></sub></a><br /><a href=\"#translation-Syltech\" title=\"Translation\">🌍</a></td>\n    <td align=\"center\"><a href=\"https://github.com/giovannicardamone\"><img src=\"https://avatars1.githubusercontent.com/u/5117748?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Giovanni Cardamone</b></sub></a><br /><a href=\"https://github.com/ptkdev/ptkdev-logger/commits?author=GiovanniCardamone\" title=\"Code\">💻</a></td>\n  </tr>\n</table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\n> 💰 In the future, if the donations allow it, I would like to share some of the success with those who helped me the most. For me open source is share of code, share development knowledges and share donations!\n\n## 📲 Tools\n\n[![](https://img.shields.io/badge/portfolio-ptkdev-000000.svg)](https://ptk.dev/)\n[![](https://img.shields.io/badge/app-meingifs-E1215B.svg)](https://meingifs.pics/)\n[![](https://img.shields.io/badge/stickers-ptkdev-128C7E.svg)](https://stickers.ptkdev.io/)\n\n[![](https://img.shields.io/badge/app-social%20manager%20tools-ff7f19.svg)](http://logger.ptkdev.io/)\n[![](https://img.shields.io/badge/api-instagram%20bot-895a4d.svg)](https://github.com/ptkdev/ptkdev-logger)\n[![](https://img.shields.io/badge/api-twitter%20bot-21B7F4.svg)](https://github.com/social-manager-tools/socialmanagertools-twbot)\n[![](https://img.shields.io/badge/api-facebook%20bot-3b5998.svg)](https://github.com/social-manager-tools/socialmanagertools-fbbot)\n[![](https://img.shields.io/badge/telegram%20bot-feed%20rss%20for%20wordpress%20&%20medium-00AB6C.svg)](https://github.com/social-manager-tools/socialmanagertools-tgbot)\n\n## 🐍 Sorry for snake_case\n\nI love snake_case syntax sorry for this 😭 don't hate me.\n\n## 💫 License\n\n-   Code and Contributions have **MIT License**\n-   Images and logos have **CC BY-NC 4.0 License** ([Freepik](https://it.freepik.com/) Premium License)\n-   Documentations and Translations have **CC BY 4.0 License**\n\n###### Copyleft (c) 2020 [Patryk Rzucidło](https://ptk.dev) ([@PTKDev](https://twitter.com/ptkdev)) <[support@ptkdev.io](mailto:support@ptkdev.io)>\n"
  },
  {
    "path": "examples/example-json.js",
    "content": "/**\n * Logger: example (json output)\n * =====================\n *\n * @contributors: Patryk Rzucidło [@ptkdev] <support@ptkdev.io> (https://ptk.dev)\n *\n * @license: MIT License\n *\n */\nconst Logger = require(\"./../modules/logger\"); // in your project use: require(\"@ptkdev/logger\");\n\nconst options = {\n\t\"language\": \"en\", // set language of log type, NOTE: please help with translations! (optional, default en - values: en|it|pl|es|pt|de|ru)\n\t\"colors\": true,  // enable/disable colors in terminal (optional, default enabled - values: true|enabled or false|disabled)\n\t\"debug\": true,   // enable/disable all logs with method debug (optional, default enabled - values: true|enabled or false|disabled)\n\t\"info\": true,    // enable/disable all logs with method info (optional, default enabled - values: true|enabled or false|disabled)\n\t\"warning\": true, // enable/disable all logs with method warning (optional, default enabled -  values: true|enabled or false|disabled)\n\t\"error\": true,   // enable/disable all logs with method errors (optional, default enabled - values: true|enabled or false|disabled)\n\t\"sponsor\": true, // enable/disable all logs with method sponsor (optional, default enabled - values: true|enabled or false|disabled)\n\t\"write\": true,   // write the logs into a file, you need set path values (optional, default disabled - values: true|enabled or false|disabled)\n\t\"type\": \"json\",   // format of logs in files (optional, default log - values: log|json)\n\t\"path\": {        // if write is true, the library writes the logs to a path\n\t\t\"debug_log\": \"./debug.json\",  // all logs\n\t\t\"error_log\": \"./errors.json\", // only errors logs\n\t}\n};\n\nconst logger = new Logger(options);\nlogger.info(\"your info message\", \"your tag\");\nlogger.warning(\"your warning message\", \"your tag\");\nlogger.error(\"your error message\", \"your tag\");\nlogger.debug(\"your debug message\", \"your tag\");\nlogger.sponsor(\"your sponsor message\", \"your tag\");\nlogger.stackoverflow(\"your stackoverflow message\", \"your tag\");\nlogger.docs(\"your docs message\", \"https://docs.yoursite.com\", \"your tag\");"
  },
  {
    "path": "examples/example.js",
    "content": "/**\n * Logger: example\n * =====================\n *\n * @contributors: Patryk Rzucidło [@ptkdev] <support@ptkdev.io> (https://ptk.dev)\n *\n * @license: MIT License\n *\n */\nconst Logger = require(\"./../modules/logger\"); // in your project use: require(\"@ptkdev/logger\");\n\nconst options = {\n\t\"language\": \"en\", // set language of log type, NOTE: please help with translations! (optional, default en - values: en|it|pl|es|pt|de|ru)\n\t\"colors\": true,  // enable/disable colors in terminal (optional, default enabled - values: true|enabled or false|disabled)\n\t\"debug\": true,   // enable/disable all logs with method debug (optional, default enabled - values: true|enabled or false|disabled)\n\t\"info\": true,    // enable/disable all logs with method info (optional, default enabled - values: true|enabled or false|disabled)\n\t\"warning\": true, // enable/disable all logs with method warning (optional, default enabled -  values: true|enabled or false|disabled)\n\t\"error\": true,   // enable/disable all logs with method errors (optional, default enabled - values: true|enabled or false|disabled)\n\t\"sponsor\": true, // enable/disable all logs with method sponsor (optional, default enabled - values: true|enabled or false|disabled)\n\t\"write\": true,   // write the logs into a file, you need set path values (optional, default disabled - values: true|enabled or false|disabled)\n\t\"type\": \"log\",   // format of logs in files (optional, default log - values: log|json)\n\t\"rotate\": {\n\t\t\"size\": \"10M\",  // Rotates the file when size exceeds 10 megabytes (optional, default 10M - values: 10B (byte) / 10K (kilobyte)/ 10M (megabyte)/ 10G (gigabyte))\n\t\t\"encoding\": \"utf8\"\n\t},\n\t\"path\": {        // if write is true, the library writes the logs to a path\n\t\t\"debug_log\": \"./debug.log\",  // all logs\n\t\t\"error_log\": \"./errors.log\", // only errors logs\n\t},\n\t\"palette\": {\n\t\t\"info\": {\n\t\t\t\"label\": \"#ffffff\", // label on left\n\t\t\t\"text\": \"#2ECC71\",  // log message\n\t\t\t\"background\": \"#2ECC71\" // background\n\t\t},\n\t\t\"warning\": {\n\t\t\t\"label\": \"#ffffff\",\n\t\t\t\"text\": \"#FF9800\",\n\t\t\t\"background\": \"#FF9800\"\n\t\t},\n\t\t\"error\": {\n\t\t\t\"label\": \"#ffffff\",\n\t\t\t\"text\": \"#FF5252\",\n\t\t\t\"background\": \"#FF5252\"\n\t\t},\n\t\t\"stackoverflow\": {\n\t\t\t\"label\": \"#ffffff\",\n\t\t\t\"text\": \"#9C27B0\",\n\t\t\t\"background\": \"#9C27B0\"\n\t\t},\n\t\t\"docs\": {\n\t\t\t\"label\": \"#ffffff\",\n\t\t\t\"text\": \"#FF4081\",\n\t\t\t\"background\": \"#FF4081\"\n\t\t},\n\t\t\"debug\": {\n\t\t\t\"label\": \"#ffffff\",\n\t\t\t\"text\": \"#1976D2\",\n\t\t\t\"background\": \"#1976D2\"\n\t\t},\n\t\t\"sponsor\": {\n\t\t\t\"label\": \"#ffffff\",\n\t\t\t\"text\": \"#607D8B\",\n\t\t\t\"background\": \"#607D8B\"\n\t\t},\n\t\t\"time\": {\n\t\t\t\"label\": \"#ffffff\",\n\t\t\t\"background\": \"#795548\"\n\t\t}\n\t}\n};\n\nconst logger = new Logger(options);\nlogger.info(\"your info message\", \"your tag\");\nlogger.warning(\"your warning message\", \"your tag\");\nlogger.error(\"your error message\", \"your tag\");\nlogger.debug(\"your debug message\", \"your tag\");\nlogger.sponsor(\"your sponsor message\", \"your tag\");\nlogger.stackoverflow(\"your stackoverflow message\", \"your tag\");\nlogger.docs(\"your docs message\", \"https://docs.yoursite.com\", \"your tag\");"
  },
  {
    "path": "jsconfig.json",
    "content": "{\n\t\"exclude\": [\n\t\t\"node_modules\"\n\t],\n\t\"include\": [\n\t\t\"**/*.js\"\n\t]\n}"
  },
  {
    "path": "modules/logger.d.ts",
    "content": "declare module \"@ptkdev/logger\" {\n\tinterface RotateType {\n\t\tsize: \"10B\" | \"10K\" | \"10M\" | \"10G\";\n\t\tencoding?: string;\n\t}\n\n\tinterface PaletteElement {\n\t\tlabel: string;\n\t\ttext: string;\n\t\tbackground: string;\n\t}\n\n\tinterface PaletteType {\n\t\tinfo?: PaletteElement;\n\t\twarning?: PaletteElement;\n\t\terror?: PaletteElement;\n\t\tstackoverflow?: PaletteElement;\n\t\tdocs?: PaletteElement;\n\t\tdebug?: PaletteElement;\n\t\tsponsor?: PaletteElement;\n\t\ttime?: Omit<PaletteElement, \"text\">;\n\t}\n\n\tinterface PathType {\n\t\tdebug_log: string;\n\t\terror_log: string;\n\t}\n\n\tinterface LoggerOptions {\n\t\tlanguage?: \"de\" | \"en\" | \"es\" | \"fr\" | \"it\" | \"pl\" | \"pt\" | \"ru\";\n\t\tcolors?: boolean;\n\t\tdebug?: boolean;\n\t\tinfo?: boolean;\n\t\twarning?: boolean;\n\t\terror?: boolean;\n\t\tsponsor?: boolean;\n\t\twrite?: boolean;\n\t\ttype?: \"log\" | \"json\";\n\t\trotate?: RotateType;\n\t\tpalette?: PaletteType;\n\t\tpath?: PathType;\n\t}\n\n\texport default class Logger {\n\t\tconstructor(options?: LoggerOptions);\n\n\t\t/**\n\t\t * Logging of the debug message\n\t\t * =====================\n\t\t * This method show message on terminal and/or write message on file/json\n\t\t *\n\t\t * @param {string} message - description of issue (mandatory)\n\t\t * @param {string} tag - func unique tag (optional)\n\t\t *\n\t\t */\n\t\tdebug(message: string, tag?: string): void;\n\n\t\t/**\n\t\t * Logging of the info message\n\t\t * =====================\n\t\t * This method show message on terminal and/or write message on file/json\n\t\t *\n\t\t * @param {string} message - description of issue (mandatory)\n\t\t * @param {string} tag - func unique tag (optional)\n\t\t *\n\t\t */\n\t\tinfo(message: string, tag?: string): void;\n\n\t\t/**\n\t\t * Logging of the warning message\n\t\t * =====================\n\t\t * This method show message on terminal and/or write message on file/json\n\t\t *\n\t\t * @param {string} message - description of issue (mandatory)\n\t\t * @param {string} tag - func unique tag (optional)\n\t\t *\n\t\t */\n\t\twarning(message: string, tag?: string): void;\n\n\t\t/**\n\t\t * Logging of the error message\n\t\t * =====================\n\t\t * This method show message on terminal and/or write message on file/json\n\t\t *\n\t\t * @param {string} message - description of issue (mandatory)\n\t\t * @param {string} tag - func unique tag (optional)\n\t\t *\n\t\t */\n\t\terror(message: string, tag?: string): void;\n\n\t\t/**\n\t\t * Logging of the sponsor message\n\t\t * =====================\n\t\t * This method show message on terminal and/or write message on file/json\n\t\t *\n\t\t * @param {string} message - description of issue (mandatory)\n\t\t * @param {string} tag - func unique tag (optional)\n\t\t *\n\t\t */\n\t\tsponsor(message: string, tag?: string): void;\n\n\t\t/**\n\t\t * Logging of the stackoverflow message\n\t\t * =====================\n\t\t * This method show message on terminal and/or write message on file/json\n\t\t *\n\t\t * @param {string} message - description of issue (mandatory)\n\t\t * @param {string} tag - func unique tag (optional)\n\t\t * @param {string} error_message - error message to stackoverflow (optional)\n\t\t *\n\t\t */\n\t\tstackoverflow(\n\t\t\tmessage: string,\n\t\t\ttag?: string,\n\t\t\terror_message?: string\n\t\t): void;\n\n\t\t/**\n\t\t * Logging of the docs message\n\t\t * =====================\n\t\t * This method show message on terminal and/or write message on file/json\n\t\t *\n\t\t * @param {string} message - description of issue (mandatory)\n\t\t * @param {string} url - url of documentation (optional)\n\t\t * @param {string} tag - func unique tag (optional)\n\t\t *\n\t\t *\n\t\t */\n\t\tdocs(message: string, url?: string, tag?: string): void;\n\t}\n}\n"
  },
  {
    "path": "modules/logger.js",
    "content": "/**\n * Logger: write log\n * =====================\n *\n * @contributors: Patryk Rzucidło [@ptkdev] <support@ptkdev.io> (https://ptk.dev)\n * \t\t\t\t  Ilya Chubarov [@agoalofalife] <agoalofalife@gmail.com>\n *\n * @license: MIT License\n *\n */\nconst path = require(\"path\");\nconst fse = require(\"fs-extra\");\nconst chalk = require(\"chalk\");\nconst ansi = require(\"strip-ansi\");\nconst rfs = require(\"rotating-file-stream\");\nconst lowdb = require(\"lowdb\");\nconst FileSync = require(\"lowdb/adapters/FileSync\");\nconst languages = {\n\tde: require(\"../translations/de\"),\n\ten: require(\"../translations/en\"),\n\tes: require(\"../translations/es\"),\n\tfr: require(\"../translations/fr\"),\n\tit: require(\"../translations/it\"),\n\tpl: require(\"../translations/pl\"),\n\tpt: require(\"../translations/pt\"),\n\tru: require(\"../translations/ru\")\n};\nconst logger = console;\nlet Types = require(\"./types\");\nclass Log {\n\tconstructor(options = new Object) {\n\t\tif (typeof options.language === \"undefined\" || options.language === null) {\n\t\t\toptions.language = \"en\";\n\t\t}\n\n\t\tTypes.INFO.label = languages[options.language][\"INFO\"];\n\t\tTypes.WARNING.label = languages[options.language][\"WARNING\"];\n\t\tTypes.ERROR.label = languages[options.language][\"ERROR\"];\n\t\tTypes.DEBUG.label = languages[options.language][\"DEBUG\"];\n\t\tTypes.DOCS.label = languages[options.language][\"DOCS\"];\n\t\tTypes.STACKOVERFLOW.label = languages[options.language][\"STACKOVERFLOW\"];\n\t\tTypes.SPONSOR.label = languages[options.language][\"SPONSOR\"];\n\n\t\tif (typeof options.palette === \"undefined\" || options.palette === null) {\n\t\t\toptions.palette = null;\n\t\t} else {\n\t\t\tif (typeof options.palette.info !== \"undefined\" && options.palette.info !== null) {\n\t\t\t\tTypes.INFO.bgcolor = (typeof options.palette.info.background === \"undefined\" || options.palette.info.background === null) ? Types.INFO.bgcolor : chalk.bgHex(options.palette.info.background).hex(options.palette.info.label);\n\t\t\t\tTypes.INFO.color = (typeof options.palette.info.text === \"undefined\" || options.palette.info.text === null) ? Types.INFO.color : chalk.hex(options.palette.info.text);\n\t\t\t}\n\n\t\t\tif (typeof options.palette.warning !== \"undefined\" && options.palette.warning !== null) {\n\t\t\t\tTypes.WARNING.bgcolor = (typeof options.palette.warning.background === \"undefined\" || options.palette.warning.background === null) ? Types.WARNING.bgcolor : chalk.bgHex(options.palette.warning.background).hex(options.palette.warning.label);\n\t\t\t\tTypes.WARNING.color = (typeof options.palette.warning.text === \"undefined\" || options.palette.warning.text === null) ? Types.WARNING.color : chalk.hex(options.palette.warning.text);\n\t\t\t}\n\n\t\t\tif (typeof options.palette.error !== \"undefined\" && options.palette.error !== null) {\n\t\t\t\tTypes.ERROR.bgcolor = (typeof options.palette.error.background === \"undefined\" || options.palette.error.background === null) ? Types.ERROR.bgcolor : chalk.bgHex(options.palette.error.background).hex(options.palette.error.label);\n\t\t\t\tTypes.ERROR.color = (typeof options.palette.error.text === \"undefined\" || options.palette.error.text === null) ? Types.ERROR.color : chalk.hex(options.palette.error.text);\n\t\t\t}\n\n\t\t\tif (typeof options.palette.debug !== \"undefined\" && options.palette.debug !== null) {\n\t\t\t\tTypes.DEBUG.bgcolor = (typeof options.palette.debug.background === \"undefined\" || options.palette.debug.background === null) ? Types.DEBUG.bgcolor : chalk.bgHex(options.palette.debug.background).hex(options.palette.debug.label);\n\t\t\t\tTypes.DEBUG.color = (typeof options.palette.debug.text === \"undefined\" || options.palette.debug.text === null) ? Types.DEBUG.color : chalk.hex(options.palette.debug.text);\n\t\t\t}\n\n\t\t\tif (typeof options.palette.docs !== \"undefined\" && options.palette.docs !== null) {\n\t\t\t\tTypes.DOCS.bgcolor = (typeof options.palette.docs.background === \"undefined\" || options.palette.docs.background === null) ? Types.DOCS.bgcolor : chalk.bgHex(options.palette.docs.background).hex(options.palette.docs.label);\n\t\t\t\tTypes.DOCS.color = (typeof options.palette.docs.text === \"undefined\" || options.palette.docs.text === null) ? Types.DOCS.color : chalk.hex(options.palette.docs.text);\n\t\t\t}\n\n\t\t\tif (typeof options.palette.stackoverflow !== \"undefined\" && options.palette.stackoverflow !== null) {\n\t\t\t\tTypes.STACKOVERFLOW.bgcolor = (typeof options.palette.stackoverflow.background === \"undefined\" || options.palette.stackoverflow.background === null) ? Types.STACKOVERFLOW.bgcolor : chalk.bgHex(options.palette.stackoverflow.background).hex(options.palette.stackoverflow.label);\n\t\t\t\tTypes.STACKOVERFLOW.color = (typeof options.palette.stackoverflow.text === \"undefined\" || options.palette.stackoverflow.text === null) ? Types.STACKOVERFLOW.color : chalk.hex(options.palette.stackoverflow.text);\n\t\t\t}\n\n\t\t\tif (typeof options.palette.sponsor !== \"undefined\" && options.palette.sponsor !== null) {\n\t\t\t\tTypes.SPONSOR.bgcolor = (typeof options.palette.sponsor.background === \"undefined\" || options.palette.sponsor.background === null) ? Types.SPONSOR.bgcolor : chalk.bgHex(options.palette.sponsor.background).hex(options.palette.sponsor.label);\n\t\t\t\tTypes.SPONSOR.color = (typeof options.palette.sponsor.text === \"undefined\" || options.palette.sponsor.text === null) ? Types.SPONSOR.color : chalk.hex(options.palette.sponsor.text);\n\t\t\t}\n\n\t\t\tif (typeof options.palette.time !== \"undefined\" && options.palette.time !== null) {\n\t\t\t\tTypes.TIME.bgcolor = (typeof options.palette.time.background === \"undefined\" || options.palette.time.background === null) ? Types.TIME.bgcolor : chalk.bgHex(options.palette.time.background).hex(options.palette.time.label);\n\t\t\t\tTypes.TIME.color = (typeof options.palette.time.text === \"undefined\" || options.palette.time.text === null) ? Types.TIME.color : chalk.hex(options.palette.time.text);\n\t\t\t}\n\t\t}\n\n\t\tif (typeof options.colors === \"undefined\" || options.colors === null) {\n\t\t\toptions.colors = true;\n\t\t}\n\n\t\tif (typeof options.debug === \"undefined\" || options.debug === null) {\n\t\t\toptions.debug = true;\n\t\t}\n\n\t\tif (typeof options.info === \"undefined\" || options.info === null) {\n\t\t\toptions.info = true;\n\t\t}\n\n\t\tif (typeof options.warning === \"undefined\" || options.warning === null) {\n\t\t\toptions.warning = true;\n\t\t}\n\n\t\tif (typeof options.error === \"undefined\" || options.error === null) {\n\t\t\toptions.error = true;\n\t\t}\n\n\t\tif (typeof options.type === \"undefined\" || options.type === null) {\n\t\t\toptions.type = \"log\";\n\t\t}\n\n\t\tif (typeof options.write === \"undefined\" || options.write === null) {\n\t\t\toptions.write = false;\n\t\t} else if (typeof options.path === \"undefined\" || options.path === null) {\n\t\t\tif (typeof options.debug_log === \"undefined\" || options.debug_log === null) {\n\t\t\t\toptions.debug_log = \"./debug.log\";\n\t\t\t}\n\n\t\t\tif (typeof options.error_log === \"undefined\" || options.error_log === null) {\n\t\t\t\toptions.error_log = \"./errors.log\";\n\t\t\t}\n\t\t}\n\n\t\tif (typeof options.rotate === \"undefined\" || options.rotate === null) {\n\t\t\toptions.rotate = {\n\t\t\t\tsize: \"10M\",\n\t\t\t\tencoding: \"utf8\"\n\t\t\t};\n\t\t}\n\n\t\tthis.config = options;\n\n\t\tif (this.config.write === \"enabled\" || this.config.write === true) {\n\t\t\tconst pad = num => (num > 9 ? \"\" : \"0\") + num;\n\t\t\trfs.createStream((time, index) => {\n\t\t\t\tif (!time) {\n\t\t\t\t\treturn this.config.path.debug_log;\n\t\t\t\t}\n\n\t\t\t\treturn `${path.parse(this.config.path.debug_log).base.split(\".\")[0]}.${time.getFullYear()}${pad(time.getMonth() + 1)}${pad(time.getDate())}-${index}.${path.parse(this.config.path.debug_log).base.split(\".\")[1]}`;\n\t\t\t}, this.config.rotate);\n\n\t\t\trfs.createStream((time, index) => {\n\t\t\t\tif (!time) {\n\t\t\t\t\treturn this.config.path.error_log;\n\t\t\t\t}\n\n\t\t\t\treturn `${path.parse(this.config.path.error_log).base.split(\".\")[0]}.${time.getFullYear()}${pad(time.getMonth() + 1)}${pad(time.getDate())}-${index}.${path.parse(this.config.path.error_log).base.split(\".\")[1]}`;\n\t\t\t}, this.config.rotate);\n\n\t\t}\n\t\tthis.TYPES_LOG = Types;\n\t}\n\n\t/**\n\t * Date now\n\t * =====================\n\t * Current (now) date and time for prefix of logs. Timezone is supported.\n\t *\n\t * @param {string} format - format of date: json, timestamp or string (optional, deafult: string)\n\n\t * @return {string} time - current Date.now()\n\t *\n\t */\n\tcurrentTime(format = \"string\") {\n\t\tlet tz_offset = (new Date()).getTimezoneOffset() * 60000;\n\n\t\tif (format === \"json\") {\n\t\t\treturn (new Date(Date.now() - tz_offset)).toISOString();\n\t\t}\n\n\t\tif (format === \"timestamp\") {\n\t\t\treturn (new Date(Date.now() - tz_offset)).getTime();\n\t\t}\n\n\t\treturn (new Date(Date.now() - tz_offset)).toISOString().slice(0, -5).replace(\"T\", \" \");\n\n\t}\n\n\t/**\n\t * Write the output of console.log() to file\n\t * =====================\n\t * Write messages to debug.log and error.log in /logs folder\n\t *\n\t * @param {string} type - example: INFO/WARNING/ERROR/DEBUG or other valid type string (see ./types.js) (mandatory)\n\t * @param {string} message - description of issue (mandatory)\n\t * @param {string} tag - func unique tag (optional)\n\t *\n\t */\n\tappendFile(type = \"INFO\", tag = \"\", message = \"\") {\n\t\tif (this.config.write === \"enabled\" || this.config.write === true) {\n\t\t\tif (this.config.type === \"log\") {\n\t\t\t\tif (tag !== \"\") {\n\t\t\t\t\ttag = `${tag}: `;\n\t\t\t\t}\n\t\t\t\tlet log_text = `[${this.currentTime()}] [${type.id}] ${tag}${message}\\n`;\n\n\t\t\t\tfse.appendFile(this.config.path.debug_log, ansi(log_text), (err) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tlogger.log(err);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (type.id === \"ERROR\") {\n\t\t\t\t\tfse.appendFile(this.config.path.error_log, ansi(log_text), (err) => {\n\t\t\t\t\t\tif (err) {\n\t\t\t\t\t\t\tlogger.err(err);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\tconst debug_adapter = new FileSync(this.config.path.debug_log);\n\t\t\t\tconst debug_db = lowdb(debug_adapter);\n\t\t\t\tconst error_adapter = new FileSync(this.config.path.error_log);\n\t\t\t\tconst error_db = lowdb(error_adapter);\n\t\t\t\tlet level = 0;\n\n\t\t\t\tswitch (type.id) {\n\t\t\t\t\tcase \"ERROR\":\n\t\t\t\t\t\tlevel = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"WARNING\":\n\t\t\t\t\t\tlevel = 2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"INFO\":\n\t\t\t\t\t\tlevel = 3;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"DEBUG\":\n\t\t\t\t\t\tlevel = 4;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tlevel = 5;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdebug_db.defaults({logs: []}).write();\n\t\t\t\terror_db.defaults({logs: []}).write();\n\n\t\t\t\tdebug_db.get(\"logs\").push({level: level, time: this.currentTime(\"timestamp\"), date: this.currentTime(\"json\"), msg: ansi(message), tag: ansi(tag), v: 1}).write();\n\n\t\t\t\tif (type.id === \"ERROR\") {\n\t\t\t\t\terror_db.get(\"logs\").push({level: level, time: this.currentTime(\"timestamp\"), date: this.currentTime(\"json\"), msg: ansi(message), tag: ansi(tag), v: 1}).write();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Write to stdout\n\t * =====================\n\t * Stdout manager - don't use this directly. Use info() error() debug() warning()\n\t *\n\t * @param {string} type - example: INFO/WARNING/ERROR/DEBUG or other valid type string (see ./types.js) (mandatory)\n\t * @param {string} tag - func unique tag (optional)\n\t * @param {string} message - error, warning or info description (mandatory)\n\t *\n\t */\n\tstdout(type = \"INFO\", tag = \"\", message = \"\") {\n\t\tlet time = this.TYPES_LOG.TIME;\n\t\tif (tag !== \"\") {\n\t\t\ttag = ` ${tag}:`;\n\t\t}\n\t\tif (this.config.colors === \"enabled\" || this.config.colors === true) {\n\t\t\tlogger.log(chalk`${type.bgcolor(type.label)}${time.bgcolor(` ${this.currentTime()} `)}${type.bgcolor(\" \")}${type.color(tag)} ${type.color(message)}`);\n\t\t} else {\n\t\t\tlogger.log(ansi(chalk`${type.bgcolor(type.label)}${time.bgcolor(` ${this.currentTime()} `)}${type.bgcolor(\" \")}${type.color(tag)} ${type.color(message)}`));\n\t\t}\n\t}\n\n\t/**\n\t * Write to stderr\n\t * =====================\n\t * Stderr manager - don't use this directly. Use info() error() debug() warning()\n\t *\n\t * @param {string} type - example: INFO/WARNING/ERROR/DEBUG or other valid type string (see ./types.js) (mandatory)\n\t * @param {string} tag - func unique tag (optional)\n\t * @param {string} message - error, warning or info description (mandatory)\n\t *\n\t */\n\tstderr(type = \"ERROR\", tag = \"\", message = \"\") {\n\t\tlet time = this.TYPES_LOG.TIME;\n\t\tif (tag !== \"\") {\n\t\t\ttag = ` ${tag}:`;\n\t\t}\n\t\tif (this.config.colors === \"enabled\" || this.config.colors === true) {\n\t\t\tlogger.error(chalk`${type.bgcolor(type.label)}${time.bgcolor(` ${this.currentTime()} `)}${type.bgcolor(\" \")}${type.color(tag)} ${type.color(message)}`);\n\t\t} else {\n\t\t\tlogger.error(ansi(chalk`${type.bgcolor(type.label)}${time.bgcolor(` ${this.currentTime()} `)}${type.bgcolor(\" \")}${type.color(tag)} ${type.color(message)}`));\n\t\t}\n\t}\n\n\t/**\n\t * Logging of the info message\n\t * =====================\n\t * This method show message on terminal and/or write message on file/json\n\t *\n\t * @param {string} message - description of issue (mandatory)\n\t * @param {string} tag - func unique tag (optional)\n\t *\n\t */\n\tinfo(message = \"\", tag = \"\") {\n\t\tif (this.config.info === \"enabled\" || this.config.info === true) {\n\t\t\tthis.stdout(this.TYPES_LOG.INFO, tag, `${message}`);\n\t\t\tthis.appendFile(this.TYPES_LOG.INFO, tag, message);\n\t\t}\n\t}\n\n\t/**\n\t * Logging of the warning message\n\t * =====================\n\t * This method show message on terminal and/or write message on file/json\n\t *\n\t * @param {string} message - description of issue (mandatory)\n\t * @param {string} tag - func unique tag (optional)\n\t *\n\t */\n\twarning(message = \"\", tag = \"\") {\n\t\tif (this.config.warning === \"enabled\" || this.config.warning === true) {\n\t\t\tthis.stdout(this.TYPES_LOG.WARNING, tag, `${message}`);\n\t\t\tthis.appendFile(this.TYPES_LOG.WARNING, tag, message);\n\t\t}\n\t}\n\n\t/**\n\t * Logging of the error message\n\t * =====================\n\t * This method show message on terminal and/or write message on file/json\n\t *\n\t * @param {string} message - description of issue (mandatory)\n\t * @param {string} tag - func unique tag (optional)\n\t *\n\t */\n\terror(message = \"\", tag = \"\") {\n\t\tif (this.config.error === \"enabled\" || this.config.error === true) {\n\t\t\tthis.stderr(this.TYPES_LOG.ERROR, tag, `${message}`);\n\t\t\tthis.appendFile(this.TYPES_LOG.ERROR, tag, message);\n\t\t}\n\t}\n\n\t/**\n\t * Logging of the debug message\n\t * =====================\n\t * This method show message on terminal and/or write message on file/json\n\t *\n\t * @param {string} message - description of issue (mandatory)\n\t * @param {string} tag - func unique tag (optional)\n\t *\n\t */\n\tdebug(message = \"\", tag = \"\") {\n\t\tif (this.config.debug === \"enabled\" || this.config.debug === true) {\n\t\t\tthis.stdout(this.TYPES_LOG.DEBUG, tag, `${message}`);\n\t\t\tthis.appendFile(this.TYPES_LOG.DEBUG, tag, message);\n\t\t}\n\t}\n\n\t/**\n\t * Logging of the docs message\n\t * =====================\n\t * This method show message on terminal and/or write message on file/json\n\t *\n\t * @param {string} message - description of issue (mandatory)\n\t * @param {string} url - url of documentation (optional)\n\t * @param {string} tag - func unique tag (optional)\n\t *\n\t */\n\tdocs(message = \"\", url = \"\", tag = \"\") {\n\t\tlet docs = this.TYPES_LOG.DOCS;\n\n\t\tthis.stdout(this.TYPES_LOG.DOCS, tag, `${message} - ${docs.color.underline.italic(url)}`);\n\t\tthis.appendFile(this.TYPES_LOG.DOCS, tag, `${message} - ${docs.color.underline.italic(url)}`);\n\t}\n\n\t/**\n\t * Logging of the stackoverflow message\n\t * =====================\n\t * This method show message on terminal and/or write message on file/json\n\t *\n\t * @param {string} message - description of issue (mandatory)\n\t * @param {string} tag - func unique tag (optional)\n\t * @param {string} error_message - error message to stackoverflow (optional)\n\t *\n\t */\n\tstackoverflow(message = \"\", tag = \"\", error_message = null) {\n\t\tif (typeof error_message === \"undefined\" || error_message === null) {\n\t\t\terror_message = message;\n\t\t}\n\n\t\tlet stackoverflow = this.TYPES_LOG.STACKOVERFLOW;\n\n\t\tlet url = `https://stackoverflow.com/search?q=${encodeURI(error_message)}`;\n\t\tthis.stdout(this.TYPES_LOG.STACKOVERFLOW, tag, `${message} - ${stackoverflow.color.underline.italic(url)}`);\n\t\tthis.appendFile(this.TYPES_LOG.STACKOVERFLOW, tag, `${message} - ${stackoverflow.color.underline.italic(url)}`);\n\t}\n\n\t/**\n\t * Logging of the sponsor message\n\t * =====================\n\t * This method show message on terminal and/or write message on file/json\n\t *\n\t * @param {string} message - description of issue (mandatory)\n\t * @param {string} tag - func unique tag (optional)\n\t *\n\t */\n\tsponsor(message = \"\", tag = \"\") {\n\t\tthis.stdout(this.TYPES_LOG.SPONSOR, tag, message);\n\t\tthis.appendFile(this.TYPES_LOG.SPONSOR, tag, message);\n\t}\n}\n\nmodule.exports = Log;\nmodule.exports.default = Log;"
  },
  {
    "path": "modules/types.js",
    "content": "/**\n * Types\n * =====================\n * Color and tags of debug and log message\n *\n * @contributors: Patryk Rzucidło [@ptkdev] <support@ptkdev.io> (https://ptk.dev)\n *                Ilya Chubarov [@agoalofalife] <agoalofalife@gmail.com>\n *\n * @license: MIT License\n *\n */\nconst chalk = require(\"chalk\");\n\nmodule.exports = {\n\tDEBUG: {\n\t\tbgcolor: chalk.bgRgb(155, 89, 182).white.bold,\n\t\tcolor: chalk.rgb(155, 89, 182),\n\t\tid: \"DEBUG\",\n\t\tlabel: \" | INFORMATION    \"\n\t},\n\tDOCS: {\n\t\tbgcolor: chalk.bgRgb(236, 135, 191).white.bold,\n\t\tcolor: chalk.rgb(236, 135, 191),\n\t\tid: \"DOCS\",\n\t\tlabel: \" | DOCUMENTATION  \"\n\t},\n\tERROR: {\n\t\tbgcolor: chalk.bgRgb(192, 57, 43).white.bold,\n\t\tcolor: chalk.rgb(192, 57, 43),\n\t\tid: \"ERROR\",\n\t\tlabel: \" | ERROR          \"\n\t},\n\tINFO: {\n\t\tbgcolor: chalk.bgRgb(76, 175, 80).white.bold,\n\t\tcolor: chalk.rgb(76, 175, 80),\n\t\tid: \"INFO\",\n\t\tlabel: \" | INFORMATION    \"\n\t},\n\tSPONSOR: {\n\t\tbgcolor: chalk.bgRgb(22, 160, 133).white.bold,\n\t\tcolor: chalk.rgb(22, 160, 133),\n\t\tid: \"SPONSOR\",\n\t\tlabel: \" | SPONSOR        \"\n\t},\n\tSTACKOVERFLOW: {\n\t\tbgcolor: chalk.bgRgb(41, 128, 185).white.bold,\n\t\tcolor: chalk.rgb(41, 128, 185),\n\t\tid: \"STACKOVERFLOW\",\n\t\tlabel: \" | STACKOVERFLOW  \"\n\t},\n\tTIME: {\n\t\tbgcolor: chalk.bgRgb(44, 62, 80).white.bold,\n\t\tcolor: chalk.rgb(44, 62, 80),\n\t\tid: \"TIME\",\n\t\tlabel: \" | TIME           \"\n\t},\n\tWARNING: {\n\t\tbgcolor: chalk.bgRgb(243, 156, 18).white.bold,\n\t\tcolor: chalk.rgb(243, 156, 18),\n\t\tid: \"WARNING\",\n\t\tlabel: \" | WARNING        \"\n\t}\n};"
  },
  {
    "path": "package.json",
    "content": "{\n\t\"name\": \"@ptkdev/logger\",\n\t\"description\": \"Beautiful Logger for Node.js: the best alternative to the console.log statement\",\n\t\"version\": \"1.8.0\",\n\t\"main\": \"modules/logger.js\",\n\t\"author\": \"Patryk Rzucidło [@ptkdev] <support@ptkdev.io> (https://ptk.dev)\",\n\t\"license\": \"MIT\",\n\t\"license-docs\": \"CC BY 4.0\",\n\t\"license-translations\": \"CC BY 4.0\",\n\t\"license-images\": \"CC BY-NC 4.0\",\n\t\"homepage\": \"https://logger.ptkdev.io\",\n\t\"docs\": \"https://docs.logger.ptkdev.io\",\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"https://github.com/ptkdev/ptkdev-logger.git\"\n\t},\n\t\"bugs\": {\n\t\t\"url\": \"https://github.com/ptkdev/ptkdev-logger/issues\"\n\t},\n\t\"scripts\": {\n\t\t\"example\": \"cd examples && node examples/example.js\",\n\t\t\"clean\": \"rm -rf node_modules package-lock.json && npm install\",\n\t\t\"update\": \"rm -f package-lock.json && npm update\",\n\t\t\"lint\": \"eslint ./ --cache --ignore-pattern .gitignore\",\n\t\t\"lint-fix\": \"eslint ./ --cache --ignore-pattern .gitignore --fix\",\n\t\t\"git-set-upstream\": \"git remote add upstream git@github.com:ptkdev/ptkdev-logger.git && git fetch upstream\",\n\t\t\"git-pull-upstream\": \"git pull upstream master && git pull upstream beta && git pull upstream nightly\",\n\t\t\"git-pull\": \"git pull --recursive\",\n\t\t\"git-ignore-reset\": \"git rm -r --cached . && git add . && git commit -m \\\"[Fix] Removing all files in .gitignore\\\"\",\n\t\t\"npm-publish-master\": \"git checkout master && npm publish\",\n\t\t\"npm-publish-beta\": \"git checkout beta && npm publish --tag beta\",\n\t\t\"npm-publish-nightly\": \"git checkout nightly && npm publish --tag nightly\",\n\t\t\"docs\": \"git submodule update --recursive && markserv ./README.md\",\n\t\t\"test\": \"jest\",\n\t\t\"contributors-generate\": \"all-contributors generate\",\n\t\t\"pkg-upgrade\": \"npx npm-check-updates -u && npm install && husky install\"\n\t},\n\t\"husky\": {\n\t\t\"hooks\": {\n\t\t\t\"pre-commit\": \"npm run lint && npm run contributors-generate\"\n\t\t}\n\t},\n\t\"keywords\": [\n\t\t\"ptkdev\",\n\t\t\"logger\",\n\t\t\"log\",\n\t\t\"logging\",\n\t\t\"console.log\",\n\t\t\"pinojs\",\n\t\t\"pino-logger\",\n\t\t\"pino\",\n\t\t\"typescript\"\n\t],\n\t\"engines\": {\n\t\t\"node\": \">=10.0.0\"\n\t},\n\t\"dependencies\": {\n\t\t\"rotating-file-stream\": \"^2.1.5\",\n\t\t\"chalk\": \"^4.1.2\",\n\t\t\"lowdb\": \"^1.0.0\",\n\t\t\"fs-extra\": \"^10.0.0\",\n\t\t\"strip-ansi\": \"^6.0.0\"\n\t},\n\t\"devDependencies\": {\n\t\t\"@ptkdev/all-shields-cli\": \"^2.0.2\",\n\t\t\"eslint\": \"^7.32.0\",\n\t\t\"eslint-plugin-jsdoc\": \"^36.0.8\",\n\t\t\"eslint-plugin-jest\": \"^24.4.0\",\n\t\t\"all-contributors-cli\": \"^6.20.0\",\n\t\t\"pm2\": \"^5.1.1\",\n\t\t\"json\": \"^11.0.0\",\n\t\t\"jest\": \"^27.1.0\",\n\t\t\"husky\": \"^7.0.2\",\n\t\t\"yargs\": \"^17.1.1\",\n\t\t\"markserv\": \"^1.17.4\"\n\t},\n\t\"contributors\": [\n\t\t\"Ilua Chubarov [@Ilya] <agoalofalife@gmail.com> (https://github.com/agoalofalife)\",\n\t\t\"Bruno Kummel [@Bruck1701] <kummel@gmail.com> (https://github.com/Bruck1701)\",\n\t\t\"Alina Osv [@alinaosv] <hixid@ya.ru> (https://github.com/alinaosv)\",\n\t\t\"Sylvain Téchené [@syltech] <contact@syltech.fr> (https://github.com/Syltech)\",\n\t\t\"Giovanni Cardamone [@GiovanniCardamone] <g.cardamone2@gmail.com> (https://github.com/GiovanniCardamone)\"\n\t]\n}\n"
  },
  {
    "path": "translations/de.js",
    "content": "/**\n * Translation: Portuguese\n * =====================\n * How translate:\n * Chalk: chalk is npm plugin to colorize text in terminal, example: {white.bold.bgRgb(46, 204, 113) TEXT_TEXT_TEXT }\n *        don't translate white.bold.bgRgb but translate TEXT_TEXT_TEXT before of }\n *\n * Keys:  don't translate keywords on left, example: {\"done\":\"done\"}\n *        word <done> on left side is keyword, ever in English. Translate only phrases on right side of two dots\n *\n * Param: don't translate words between ## ##, example: ##ciao##\n *\n * @contributors: Alina Osv [@alinaosv] <hixid@ya.ru> (https://github.com/alinaosv)\n *\n * @license: CC BY 4.0 License\n *\n */\nmodule.exports = {\n\tINFO: \" | INFORMATION    \",\n\tWARNING: \" | WARNUNG        \",\n\tERROR: \" | FEHLER         \",\n\tDEBUG: \" | DEBUG          \",\n\tDOCS: \" | DOKUMENTATION  \",\n\tSTACKOVERFLOW: \" | STACKOVERFLOW  \",\n\tSPONSOR: \" | SPONSOR        \"\n};"
  },
  {
    "path": "translations/en.js",
    "content": "/**\n * Translation: English\n * =====================\n * How translate:\n * Chalk: chalk is npm plugin to colorize text in terminal, example: {italic.bold.rgb(46, 204, 113) TEXT_TEXT_TEXT }\n *        don't translate italic.bold.rgb but translate TEXT_TEXT_TEXT before of }\n *\n * Keys:  don't translate keywords on left, example: {\"done\":\"i'm here\"}\n *        word <done> on left side is keyword, ever in English. Translate only phrases on right side of two dots\n *\n * Param: don't translate words between ## ##, example: ##ciao##\n *\n * @contributors: Patryk Rzucidło [@ptkdev] <support@ptkdev.io> (https://ptk.dev)\n *\n * @license: CC BY 4.0 License\n *\n */\nmodule.exports = {\n\tINFO: \" | INFORMATION    \",\n\tWARNING: \" | WARNING        \",\n\tERROR: \" | ERROR          \",\n\tDEBUG: \" | DEBUG          \",\n\tDOCS: \" | DOCUMENTATION  \",\n\tSTACKOVERFLOW: \" | STACKOVERFLOW  \",\n\tSPONSOR: \" | SPONSOR        \"\n};"
  },
  {
    "path": "translations/es.js",
    "content": "/**\n * Translation: Spanish\n * =====================\n * How translate:\n * Chalk: chalk is npm plugin to colorize text in terminal, example: {white.bold.bgRgb(46, 204, 113) TEXT_TEXT_TEXT }\n *        don't translate white.bold.bgRgb but translate TEXT_TEXT_TEXT before of }\n *\n * Keys:  don't translate keywords on left, example: {\"done\":\"done\"}\n *        word <done> on left side is keyword, ever in English. Translate only phrases on right side of two dots\n *\n * Param: don't translate words between ## ##, example: ##ciao##\n *\n * @contributors: Bruno Kummel [@Bruck1701] <kummel@gmail.com> (https://github.com/Bruck1701)\n *\n * @license: CC BY 4.0 License\n *\n */\nmodule.exports = {\n\tINFO: \" | INFORMACIÓN    \",\n\tWARNING: \" | ADVERTENCIA    \",\n\tERROR: \" | ERROR          \",\n\tDEBUG: \" | DEBUG          \",\n\tDOCS: \" | DOCUMENTACIÓN  \",\n\tSTACKOVERFLOW: \" | STACKOVERFLOW  \",\n\tSPONSOR: \" | SPONSOR        \"\n};\n"
  },
  {
    "path": "translations/fr.js",
    "content": "/**\n * Translation: English\n * =====================\n * How translate:\n * Chalk: chalk is npm plugin to colorize text in terminal, example: {italic.bold.rgb(46, 204, 113) TEXT_TEXT_TEXT }\n *        don't translate italic.bold.rgb but translate TEXT_TEXT_TEXT before of }\n *\n * Keys:  don't translate keywords on left, example: {\"done\":\"i'm here\"}\n *        word <done> on left side is keyword, ever in English. Translate only phrases on right side of two dots\n *\n * Param: don't translate words between ## ##, example: ##ciao##\n *\n * @contributors: Sylvain Téchené [@Syltech] <contact@syltech.fr> (https://github.com/Syltech)\n *\n * @license: CC BY 4.0 License\n *\n */\nmodule.exports = {\n\tINFO: \" | INFORMATION    \",\n\tWARNING: \" | ALERTE         \",\n\tERROR: \" | ERREUR         \",\n\tDEBUG: \" | DEBUG          \",\n\tDOCS: \" | DOCUMENTATION  \",\n\tSTACKOVERFLOW: \" | STACKOVERFLOW  \",\n\tSPONSOR: \" | SPONSOR        \"\n};"
  },
  {
    "path": "translations/it.js",
    "content": "/**\n * Translation: Italian\n * =====================\n * How translate:\n * Chalk: chalk is npm plugin to colorize text in terminal, example: {white.bold.bgRgb(46, 204, 113) TEXT_TEXT_TEXT }\n *        don't translate white.bold.bgRgb but translate TEXT_TEXT_TEXT before of }\n *\n * Keys:  don't translate keywords on left, example: {\"done\":\"done\"}\n *        word <done> on left side is keyword, ever in English. Translate only phrases on right side of two dots\n *\n * Param: don't translate words between ## ##, example: ##ciao##\n *\n * @contributors: Patryk Rzucidło [@ptkdev] <support@ptkdev.io> (https://ptk.dev)\n *\n * @license: CC BY 4.0 License\n *\n */\nmodule.exports = {\n\tINFO: \" | INFORMAZIONI   \",\n\tWARNING: \" | ATTENZIONE     \",\n\tERROR: \" | ERRORE         \",\n\tDEBUG: \" | DEBUG          \",\n\tDOCS: \" | DOCUMENTAZIONE \",\n\tSTACKOVERFLOW: \" | STACKOVERFLOW  \",\n\tSPONSOR: \" | SPONSOR        \"\n};"
  },
  {
    "path": "translations/pl.js",
    "content": "/**\n * Translation: Polski\n * =====================\n * How translate:\n * Chalk: chalk is npm plugin to colorize text in terminal, example: {white.bold.bgRgb(46, 204, 113) TEXT_TEXT_TEXT }\n *        don't translate white.bold.bgRgb but translate TEXT_TEXT_TEXT before of }\n *\n * Keys:  don't translate keywords on left, example: {\"done\":\"done\"}\n *        word <done> on left side is keyword, ever in English. Translate only phrases on right side of two dots\n *\n * Param: don't translate words between ## ##, example: ##ciao##\n *\n * @contributors: Patryk Rzucidło [@ptkdev] <support@ptkdev.io> (https://ptk.dev)\n *\n * @license: CC BY 4.0 License\n *\n */\nmodule.exports = {\n\tINFO: \" | INFORMACJA     \",\n\tWARNING: \" | UWAGA          \",\n\tERROR: \" | BŁĄD           \",\n\tDEBUG: \" | DEBUG          \",\n\tDOCS: \" | DOKUMENTACJA   \",\n\tSTACKOVERFLOW: \" | STACKOVERFLOW  \",\n\tSPONSOR: \" | SPONSOR        \"\n};"
  },
  {
    "path": "translations/pt.js",
    "content": "/**\n * Translation: Portuguese\n * =====================\n * How translate:\n * Chalk: chalk is npm plugin to colorize text in terminal, example: {white.bold.bgRgb(46, 204, 113) TEXT_TEXT_TEXT }\n *        don't translate white.bold.bgRgb but translate TEXT_TEXT_TEXT before of }\n *\n * Keys:  don't translate keywords on left, example: {\"done\":\"done\"}\n *        word <done> on left side is keyword, ever in English. Translate only phrases on right side of two dots\n *\n * Param: don't translate words between ## ##, example: ##ciao##\n *\n * @contributors: Bruno Kummel [@Bruck1701] <kummel@gmail.com> (https://github.com/Bruck1701) / Joel Emanoel [@joelemanoel] <email@joelemanoel.com.br> (https://github.com/joelemanoel)\n *\n * @license: CC BY 4.0 License\n *\n */\nmodule.exports = {\n\tINFO: \" | INFORMAÇÃO     \",\n\tWARNING: \" | AVISO          \",\n\tERROR: \" | ERRO           \",\n\tDEBUG: \" | DEBUG          \",\n\tDOCS: \" | DOCUMENTAÇÃO   \",\n\tSTACKOVERFLOW: \" | STACKOVERFLOW  \",\n\tSPONSOR: \" | PATROCINADOR        \"\n};\n"
  },
  {
    "path": "translations/ru.js",
    "content": "/**\n * Translation: Portuguese\n * =====================\n * How translate:\n * Chalk: chalk is npm plugin to colorize text in terminal, example: {white.bold.bgRgb(46, 204, 113) TEXT_TEXT_TEXT }\n *        don't translate white.bold.bgRgb but translate TEXT_TEXT_TEXT before of }\n *\n * Keys:  don't translate keywords on left, example: {\"done\":\"done\"}\n *        word <done> on left side is keyword, ever in English. Translate only phrases on right side of two dots\n *\n * Param: don't translate words between ## ##, example: ##ciao##\n *\n * @contributors: Alina Osv [@alinaosv] <hixid@ya.ru> (https://github.com/alinaosv)\n *\n * @license: CC BY 4.0 License\n *\n */\nmodule.exports = {\n\tINFO: \" | ИНФОРМАЦИЯ     \",\n\tWARNING: \" | ПРЕДУПРЕЖДЕНИЕ \",\n\tERROR: \" | ОШИБКА         \",\n\tDEBUG: \" | ОТЛАДКА        \",\n\tDOCS: \" | ДОКУМЕНТАЦИЯ   \",\n\tSTACKOVERFLOW: \" | STACKOVERFLOW  \",\n\tSPONSOR: \" | СПОНСОР        \"\n};\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n\t\"compilerOptions\": {\n\t\t\"module\": \"commonjs\",\n\t\t\"lib\": [\"es6\"],\n\t\t\"noImplicitAny\": true,\n\t\t\"noImplicitThis\": true,\n\t\t\"strictNullChecks\": true,\n\t\t\"strictFunctionTypes\": true,\n\t\t\"types\": [],\n\t\t\"noEmit\": true,\n\t\t\"forceConsistentCasingInFileNames\": true\n\t},\n\t\"files\": [\"modules/logger.d.ts\"]\n}\n"
  }
]