Skip to content

Commit

Permalink
Merge branch 'beta'
Browse files Browse the repository at this point in the history
  • Loading branch information
ptkdev committed Aug 19, 2020
2 parents c4166cc + 41689a5 commit 4c680e6
Show file tree
Hide file tree
Showing 7 changed files with 671 additions and 580 deletions.
3 changes: 2 additions & 1 deletion .all-contributorsrc
Expand Up @@ -61,7 +61,8 @@
{
"login": "GiovanniCardamone",
"name": "Giovanni Cardamone",
"avatar_url": "https://avatars.githubusercontent.com/giovannicardamone",
"profile": "https://github.com/giovannicardamone",
"avatar_url": "https://avatars1.githubusercontent.com/u/5117748?v=4",
"contributions": [
"code"
]
Expand Down
7 changes: 5 additions & 2 deletions CHANGELOG.md
@@ -1,9 +1,12 @@
# v1.7.0 (August 05, 2020)
* Feature: typescript typization (Thanks: Giovanni Cardamone)
# v1.7.1 (August 19, 2020)
* Fix: Typescript typization issues (#7)

[![](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.7.0 (August 05, 2020)
* Feature: typescript typization (Thanks: Giovanni Cardamone)

# v1.6.0 (May 24, 2020)
* Fix: info color (default palette) changed from #2ECC71 to #4CAF50
* Fix: docs url with custom pallette
Expand Down
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -2,7 +2,7 @@

# 🦒 Beautiful Logger for Node.js

[![](https://img.shields.io/badge/version-v1.7.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)
[![](https://img.shields.io/badge/version-v1.7.1-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)

> The best alternative to the console.log statement
Expand Down Expand Up @@ -32,6 +32,7 @@
* [✔️] MIT License
* [✔️] Palette (🎨 Customize colors)
* [✔️] Logrotate 🤹‍♂️
* [✔️] Typescript support
* [✔️] The best alternative to the console.log statement
* [✔️] Write stdout logs to file (supported format: text/log and json)
* [✔️] The JSON logs format is compatible with [pinojs](https://github.com/pinojs/pino)
Expand Down Expand Up @@ -208,11 +209,11 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<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>
<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>
<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>
<td align="center"><img src="https://avatars.githubusercontent.com/giovannicardamone?s=100" width="100px;" alt=""/><br /><sub><b>Giovanni Cardamone</b></sub><br /><a href="https://github.com/ptkdev/ptkdev-logger/commits?author=GiovanniCardamone" title="Code">💻</a></td>
<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>
</tr>
</table>

<!-- markdownlint-enable -->
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->

Expand Down
88 changes: 80 additions & 8 deletions modules/logger.d.ts
Expand Up @@ -44,16 +44,88 @@ declare module "@ptkdev/logger" {
export default class Logger {
constructor(options?: LoggerOptions);

debug?(message: string, tag?: string): void;
info?(message: string, tag?: string): void;
warning?(message: string, tag?: string): void;
error?(message: string, tag?: string): void;
sponsor?(message: string, tag?: string): void;
stackoverflow?(
/**
* Logging of the debug message
* =====================
* This method show message on terminal and/or write message on file/json
*
* @param {string} message - description of issue (mandatory)
* @param {string} tag - func unique tag (optional)
*
*/
debug(message: string, tag?: string): void;

/**
* Logging of the info message
* =====================
* This method show message on terminal and/or write message on file/json
*
* @param {string} message - description of issue (mandatory)
* @param {string} tag - func unique tag (optional)
*
*/
info(message: string, tag?: string): void;

/**
* Logging of the warning message
* =====================
* This method show message on terminal and/or write message on file/json
*
* @param {string} message - description of issue (mandatory)
* @param {string} tag - func unique tag (optional)
*
*/
warning(message: string, tag?: string): void;

/**
* Logging of the error message
* =====================
* This method show message on terminal and/or write message on file/json
*
* @param {string} message - description of issue (mandatory)
* @param {string} tag - func unique tag (optional)
*
*/
error(message: string, tag?: string): void;

/**
* Logging of the sponsor message
* =====================
* This method show message on terminal and/or write message on file/json
*
* @param {string} message - description of issue (mandatory)
* @param {string} tag - func unique tag (optional)
*
*/
sponsor(message: string, tag?: string): void;

/**
* Logging of the stackoverflow message
* =====================
* This method show message on terminal and/or write message on file/json
*
* @param {string} message - description of issue (mandatory)
* @param {string} tag - func unique tag (optional)
* @param {string} error_message - error message to stackoverflow (optional)
*
*/
stackoverflow(
message: string,
tag?: string,
error_string?: string
error_message?: string
): void;
docs?(message: string, url?: string, tag?: string): void;

/**
* Logging of the docs message
* =====================
* This method show message on terminal and/or write message on file/json
*
* @param {string} message - description of issue (mandatory)
* @param {string} url - url of documentation (optional)
* @param {string} tag - func unique tag (optional)
*
*
*/
docs(message: string, url?: string, tag?: string): void;
}
}
2 changes: 1 addition & 1 deletion modules/logger.js
Expand Up @@ -361,8 +361,8 @@ class Log {
* This method show message on terminal and/or write message on file/json
*
* @param {string} message - description of issue (mandatory)
* @param {string} tag - func unique tag (optional)
* @param {string} url - url of documentation (optional)
* @param {string} tag - func unique tag (optional)
*
*/
docs(message = "", url = "", tag = "") {
Expand Down

0 comments on commit 4c680e6

Please sign in to comment.