@ptkdev/logger
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -0,1 +1,7 @@ | ||
# v1.3.0 (May 07, 2020) | ||
* Translations: ๐ท๐บ ๐ฉ๐ช (Thanks: Alina Osv) | ||
[![](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) | ||
# v1.2.0 (May 06, 2020) | ||
@@ -5,5 +11,2 @@ * Fix: security patch | ||
[![](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) | ||
# v1.1.2 (March 28, 2020) | ||
@@ -10,0 +13,0 @@ * Fix: security patch |
@@ -13,3 +13,3 @@ /** | ||
const options = { | ||
"language": "en", // set language of log type, NOTE: please help with translations! (optional, default en - values: en|it|pl) | ||
"language": "en", // set language of log type, NOTE: please help with translations! (optional, default en - values: en|it|pl|es|pt|de|ru) | ||
"colors": true, // enable/disable colors in terminal (optional, default enabled - values: true|enabled or false|disabled) | ||
@@ -16,0 +16,0 @@ "debug": true, // enable/disable all logs with method debug (optional, default enabled - values: true|enabled or false|disabled) |
@@ -13,3 +13,3 @@ /** | ||
const options = { | ||
"language": "en", // set language of log type, NOTE: please help with translations! (optional, default en - values: en|it|pl) | ||
"language": "en", // set language of log type, NOTE: please help with translations! (optional, default en - values: en|it|pl|es|pt|de|ru) | ||
"colors": true, // enable/disable colors in terminal (optional, default enabled - values: true|enabled or false|disabled) | ||
@@ -16,0 +16,0 @@ "debug": true, // enable/disable all logs with method debug (optional, default enabled - values: true|enabled or false|disabled) |
@@ -21,3 +21,5 @@ /** | ||
pt: require("../translations/pt"), | ||
es: require("../translations/es") | ||
es: require("../translations/es"), | ||
de: require("../translations/de"), | ||
ru: require("../translations/ru"), | ||
}; | ||
@@ -24,0 +26,0 @@ const logger = console; |
{ | ||
"name": "@ptkdev/logger", | ||
"description": "Beautiful Logger for Node.js: the best alternative to the console.log statement", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"main": "modules/logger.js", | ||
@@ -82,4 +82,5 @@ "author": "Patryk Rzucidลo [@ptkdev] <support@ptkdev.io> (https://ptk.dev)", | ||
"Ilua Chubarov [@Ilya] <agoalofalife@gmail.com> (https://github.com/agoalofalife)", | ||
"Bruno Kummel [@Bruck1701] <kummel@gmail.com> (https://github.com/Bruck1701)" | ||
"Bruno Kummel [@Bruck1701] <kummel@gmail.com> (https://github.com/Bruck1701)", | ||
"Alina Osv [@alinaosv] <hixid@ya.ru> (https://github.com/alinaosv)" | ||
] | ||
} |
@@ -5,3 +5,3 @@ [![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) | ||
[![](https://img.shields.io/badge/version-v1.2.0-lightgrey.svg)](https://github.com/ptkdev/ptkdev-logger/releases) [![](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) | ||
[![](https://img.shields.io/badge/version-v1.3.0-lightgrey.svg)](https://github.com/ptkdev/ptkdev-logger/releases) [![](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) | ||
@@ -22,2 +22,4 @@ > The best alternative to the console.log statement | ||
- ๐ [Documentation](#-documentation) | ||
- - ๐งฐ [Options](#-options) | ||
- - ๐ [Methods](#-methods) | ||
- ๐จโ๐ป [Contributing](#-contributing) | ||
@@ -34,3 +36,3 @@ - ๐ [Known Bugs](https://github.com/ptkdev/ptkdev-logger/issues?q=is%3Aopen+is%3Aissue+label%3Abug) | ||
* [โ๏ธ] The JSON logs format is compatible with [pinojs](https://github.com/pinojs/pino) | ||
* [โ๏ธ] Translations: ๐ฌ๐ง ๐ฎ๐น ๐ต๐ฑ ๐ช๐ธ ๐ต๐น (Help me โค๏ธ) | ||
* [โ๏ธ] Translations: ๐ฌ๐ง ๐ฎ๐น ๐ต๐ฑ ๐ช๐ธ ๐ต๐น ๐ท๐บ ๐ฉ๐ช (Help me โค๏ธ) | ||
@@ -75,28 +77,28 @@ ## ๐ Screenshot | ||
## Options | ||
## ๐งฐ Options | ||
| Parameter | Description | Values | Default value | | ||
| --- | --- | --- | --- | | ||
| language | Set language of log type | en\|it\|pl | en | | ||
| colors | Enable colors in terminal | true\|enabled\|false\|disabled | true | | ||
| debug | Enable all logs with method debug | true\|enabled\|false\|disabled | true | | ||
| info | Enable all logs with method info | true\|enabled\|false\|disabled | true | | ||
| warning | Enable all logs with method warning | true\|enabled\|false\|disabled | true | | ||
| error | Enable all logs with method errors | true\|enabled\|false\|disabled | true | | ||
| sponsor | Enable all logs with method sponsor | true\|enabled\|false\|disabled | true | | ||
| write | Write the logs into a file, you need set path values | true\|enabled\|false\|disabled | false | | ||
| type | Format of logs in files | log\|json | log | | ||
| language | Set language of log type | en / it / pl / es / pt / de / ru | en | | ||
| colors | Enable colors in terminal | true / enabled / false / disabled | true | | ||
| debug | Enable all logs with method debug | true / enabled / false / disabled | true | | ||
| info | Enable all logs with method info | true / enabled / false / disabled | true | | ||
| warning | Enable all logs with method warning | true / enabled / false / disabled | true | | ||
| error | Enable all logs with method errors | true / enabled / false / disabled | true | | ||
| sponsor | Enable all logs with method sponsor | true / enabled / false / disabled | true | | ||
| write | Write the logs into a file, you need set path values | true / enabled / false / disabled | false | | ||
| type | Format of logs in files | log / json | log | | ||
| path | If write is true, the library writes the logs to a path | Object | `{"debug_log": "./debug.log", "error_log": "./errors.log"}` | | ||
## Methods | ||
## ๐ Methods | ||
| Method | Description | Parameters | | ||
| --- | --- | --- | | ||
| **debug**(__message__, __tag__) | `message`: Display debug log message <br> `tag`: prefix of message | `message`: string (mandatory) <br> `tag`: string (optional) | | ||
| **info**(__message__, __tag__) | `message`: Display info log message <br> `tag`: prefix of message | `message`: string (mandatory) <br> `tag`: string (optional) | | ||
| **warning**(__message__, __tag__) | `message`: Display warning log message <br> `tag`: prefix of message | `message`: string (mandatory) <br> `tag`: string (optional) | | ||
| **error**(__message__, __tag__) | `message`: Display errors log message <br> `tag`: prefix of message | `message`: string (mandatory) <br> `tag`: string (optional) | | ||
| **sponsor**(__message__, __tag__) | `message`: Display sponsor log message <br> `tag`: prefix of message | `message`: string (mandatory) <br> `tag`: string (optional) | | ||
| **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) | | ||
| **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) | | ||
| **debug**(`message`, `tag`) | `message`: Display debug log message <br> `tag`: prefix of message | `message`: string (mandatory) <br> `tag`: string (optional) | | ||
| **info**(`message`, `tag`) | `message`: Display info log message <br> `tag`: prefix of message | `message`: string (mandatory) <br> `tag`: string (optional) | | ||
| **warning**(`message`, `tag`) | `message`: Display warning log message <br> `tag`: prefix of message | `message`: string (mandatory) <br> `tag`: string (optional) | | ||
| **error**(`message`, `tag`) | `message`: Display errors log message <br> `tag`: prefix of message | `message`: string (mandatory) <br> `tag`: string (optional) | | ||
| **sponsor**(`message`, `tag`) | `message`: Display sponsor log message <br> `tag`: prefix of message | `message`: string (mandatory) <br> `tag`: string (optional) | | ||
| **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) | | ||
| **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) | | ||
@@ -129,2 +131,3 @@ ## ๐ Documentation | ||
<td align="center"><a href="https://github.com/Bruck1701"><img src="https://avatars2.githubusercontent.com/u/17711277?v=4" 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> | ||
<td align="center"><a href="https://github.com/alinaosv"><img src="https://avatars3.githubusercontent.com/u/60554247?v=4" width="100px;" alt=""/><br /><sub><b>Alina Osv</b></sub></a><br /><a href="#translation-alinaosv" title="Translation">๐</a></td> | ||
</tr> | ||
@@ -131,0 +134,0 @@ </table> |
43514
18
568
156