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 4c680e6 + 339a18e commit 9d38627
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 22 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
@@ -1,9 +1,13 @@
# v1.7.1 (August 19, 2020)
* Fix: Typescript typization issues (#7)
# v1.7.2 (August 19, 2020)
* Fix: Typescript export module

[![](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.1 (August 19, 2020)
* Fix: Typescript typization issues (#7)


# v1.7.0 (August 05, 2020)
* Feature: typescript typization (Thanks: Giovanni Cardamone)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@

# 馃 Beautiful Logger for Node.js

[![](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)
[![](https://img.shields.io/badge/version-v1.7.2-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
20 changes: 10 additions & 10 deletions modules/logger.js
Expand Up @@ -27,21 +27,20 @@ const languages = {
};
const logger = console;
let Types = require("./types");

class Log {
constructor(options = new Object) {
if (typeof options.language === "undefined" || options.language === null) {
options.language = "en";
} else {
Types.INFO.label = languages[options.language]["INFO"];
Types.WARNING.label = languages[options.language]["WARNING"];
Types.ERROR.label = languages[options.language]["ERROR"];
Types.DEBUG.label = languages[options.language]["DEBUG"];
Types.DOCS.label = languages[options.language]["DOCS"];
Types.STACKOVERFLOW.label = languages[options.language]["STACKOVERFLOW"];
Types.SPONSOR.label = languages[options.language]["SPONSOR"];
}

Types.INFO.label = languages[options.language]["INFO"];
Types.WARNING.label = languages[options.language]["WARNING"];
Types.ERROR.label = languages[options.language]["ERROR"];
Types.DEBUG.label = languages[options.language]["DEBUG"];
Types.DOCS.label = languages[options.language]["DOCS"];
Types.STACKOVERFLOW.label = languages[options.language]["STACKOVERFLOW"];
Types.SPONSOR.label = languages[options.language]["SPONSOR"];

if (typeof options.palette === "undefined" || options.palette === null) {
options.palette = null;
} else {
Expand Down Expand Up @@ -409,4 +408,5 @@ class Log {
}
}

module.exports = Log;
module.exports = Log;
module.exports.default = Log;
16 changes: 8 additions & 8 deletions modules/types.js
Expand Up @@ -16,48 +16,48 @@ module.exports = {
bgcolor: chalk.bgRgb(155, 89, 182).white.bold,
color: chalk.rgb(155, 89, 182),
id: "DEBUG",
label: " | DEBUG "
label: " | INFORMATION "
},
DOCS: {
bgcolor: chalk.bgRgb(236, 135, 191).white.bold,
color: chalk.rgb(236, 135, 191),
id: "DOCS",
label: " | DOCUMENTATION "
label: " | DOCUMENTATION "
},
ERROR: {
bgcolor: chalk.bgRgb(192, 57, 43).white.bold,
color: chalk.rgb(192, 57, 43),
id: "ERROR",
label: " | ERROR "
label: " | ERROR "
},
INFO: {
bgcolor: chalk.bgRgb(76, 175, 80).white.bold,
color: chalk.rgb(76, 175, 80),
id: "INFO",
label: " | INFORMATION "
label: " | INFORMATION "
},
SPONSOR: {
bgcolor: chalk.bgRgb(22, 160, 133).white.bold,
color: chalk.rgb(22, 160, 133),
id: "SPONSOR",
label: " | SPONSOR "
label: " | SPONSOR "
},
STACKOVERFLOW: {
bgcolor: chalk.bgRgb(41, 128, 185).white.bold,
color: chalk.rgb(41, 128, 185),
id: "STACKOVERFLOW",
label: " | STACKOVERFLOW "
label: " | STACKOVERFLOW "
},
TIME: {
bgcolor: chalk.bgRgb(44, 62, 80).white.bold,
color: chalk.rgb(44, 62, 80),
id: "TIME",
label: " | TIME "
label: " | TIME "
},
WARNING: {
bgcolor: chalk.bgRgb(243, 156, 18).white.bold,
color: chalk.rgb(243, 156, 18),
id: "WARNING",
label: " | WARNING "
label: " | WARNING "
}
};
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "@ptkdev/logger",
"description": "Beautiful Logger for Node.js: the best alternative to the console.log statement",
"version": "1.7.1",
"version": "1.7.2",
"main": "modules/logger.js",
"author": "Patryk Rzucid艂o [@ptkdev] <support@ptkdev.io> (https://ptk.dev)",
"license": "MIT",
Expand Down

0 comments on commit 9d38627

Please sign in to comment.