Skip to content

Commit

Permalink
Merge pull request #31 from vajahath/hotfix_#30
Browse files Browse the repository at this point in the history
hot fix for issue 30
  • Loading branch information
vajahath authored Mar 28, 2017
2 parents 82dbe83 + 4111bca commit d29b35c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ lme.d("hello world");
> **-** Define your own [color schemes for lines](https://github.com/vajahath/lme/wiki/Custom-Color-Schemes) <br>
> **-** Define your own [color schemes for texts](https://github.com/vajahath/lme/wiki/Custom-Color-Schemes) <br>
> **-** Multiple argumnets support: _`lme.s("hi", "hello")`_ <br>
> **-** Stability and performance improvements.
> **-** Stability, performance improvements and Bug fixes.
## Why `lme` *( logme )*

[![Greenkeeper badge](https://badges.greenkeeper.io/vajahath/lme.svg)](https://greenkeeper.io/)

[![Greenkeeper badge](https://badges.greenkeeper.io/vajahath/lme.svg)](https://greenkeeper.io/)
- Clean and semantically focused.
- Consistent design for errors, warnings, successes etc.
- Simpler to use than `console.log()` or even `console.log(chalk.red("hi"));`
Expand Down Expand Up @@ -152,6 +152,8 @@ tell your friends.. :two_men_holding_hands: <br>

## Change log

- **v1.5.1** (27th March 2017)
- IMPORTANT bug fix: addressing issue with displaying instances of `Error` class. ([#30](https://github.com/vajahath/lme/issues/30)). (Highly recommended to update to this version)
- **v1.5.0** (6th March 2017)
- Support for [custom separate color schemes for line and text](https://github.com/vajahath/lme/wiki/Custom-Color-Schemes).
- [Adjust log level](https://github.com/vajahath/lme/wiki/Adjust-Logging-Level) with environment variable.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lme",
"version": "1.5.0",
"version": "1.5.1",
"description": "Simply and beautifully log to console.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/logUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function logMessage(colorFunc, msgArgs, consoleFunc) {
var outputArgs = [];

msgArgs.forEach(function(arg) {
if (typeof(arg) == 'object') {
if ((typeof(arg) === 'object')&& !(arg instanceof Error)) {
outputArgs.push('\n' + JSON.stringify(arg, null, 2));
} else {
outputArgs.push(arg);
Expand Down
8 changes: 8 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,12 @@ lme.i('\nerror-ed outputs');

testAllLineFunctions({ yu: 1 });

var e = new Error('oh noo!');
testAllLogFunctions(e, '!!!');
testAllLogFunctions(e);

lme.wline();
lme.e(e);
console.log(e); // not getting this kind of err above..

lme.i('test finished');

0 comments on commit d29b35c

Please sign in to comment.