clix-logger
Advanced tools
Comparing version 0.1.1 to 0.1.2
# clix-logger - Changelog | ||
## v0.1.2 | ||
- **Features** | ||
- Add a logger module as a handy way to create a logger without setting coloredOutput to true - [f7684b8]( https://github.com/royriojas/clix-logger/commit/f7684b8 ), [royriojas](https://github.com/royriojas), 11/08/2015 10:07:02 | ||
- **Refactoring** | ||
- more meaningful colors and icons for logger methods - [78a9df2]( https://github.com/royriojas/clix-logger/commit/78a9df2 ), [royriojas](https://github.com/royriojas), 11/08/2015 10:06:05 | ||
## v0.1.1 | ||
@@ -4,0 +13,0 @@ - **Features** |
18
index.js
@@ -15,14 +15,10 @@ module.exports = function ( options ) { | ||
var opts = extend( { | ||
showDate: true, | ||
dateFormat: 'HH:mm:ss', | ||
coloredOutput: false, | ||
methods: { | ||
ok: { | ||
//key: 'ok', | ||
muteable: false, | ||
color: 'yellow', | ||
token: ' ✔ ︎' | ||
color: 'cyan', | ||
token: ' ❖ ' | ||
}, | ||
subtle: { | ||
//key: 'subtle', | ||
muteable: true, | ||
@@ -33,3 +29,2 @@ color: 'gray', | ||
error: { | ||
//key: 'error', | ||
muteable: false, | ||
@@ -40,3 +35,2 @@ color: 'red', | ||
log: { | ||
//key: 'log', | ||
muteable: true, | ||
@@ -46,4 +40,8 @@ color: 'white', | ||
}, | ||
warn: { | ||
muteable: false, | ||
color: 'yellow', | ||
token: ' ⚠︎ ' | ||
}, | ||
print: { | ||
//key: 'print', | ||
muteable: false, | ||
@@ -78,3 +76,3 @@ color: 'gray', | ||
} ); | ||
//var logFn = 'log'; | ||
var logFn = (key !== 'error') ? 'log' : 'error'; | ||
@@ -81,0 +79,0 @@ |
{ | ||
"name": "clix-logger", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Another console log wrapper with colored support and icons", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
[33m ✔ ︎[39m [33ma[39m [33msimple[39m [33mmessage[39m [33mof[39m [33mtype[39m [33mok[39m | ||
[36m ❖ [39m [36ma[39m [36msimple[39m [36mmessage[39m [36mof[39m [36mtype[39m [36mok[39m | ||
[90m ▸ [39m [90ma[39m [90msimple[39m [90mmessage[39m [90mof[39m [90mtype[39m [90msubtle[39m | ||
@@ -6,2 +6,3 @@ [37m ℹ︎ [39m [37ma[39m [37msimple[39m [37mmessage[39m [37mof[39m [37mtype[39m [37mlog[39m | ||
[90ma[39m [90msimple[39m [90mmessage[39m [90mof[39m [90mtype[39m [90mprint[39m | ||
[32m ✔ ︎[39m [32ma[39m [32msimple[39m [32mmessage[39m [32mof[39m [32mtype[39m [32msuccess[39m | ||
[32m ✔ ︎[39m [32ma[39m [32msimple[39m [32mmessage[39m [32mof[39m [32mtype[39m [32msuccess[39m | ||
[33m ⚠︎ [39m [33ma[39m [33msimple[39m [33mmessage[39m [33mof[39m [33mtype[39m [33mwarn[39m |
@@ -1,2 +0,2 @@ | ||
✔ ︎ a simple message of type ok { coloredOutput: false } [ 1, 2, 3 ] | ||
❖ a simple message of type ok { coloredOutput: false } [ 1, 2, 3 ] | ||
▸ a simple message of type subtle { coloredOutput: false } [ 1, 2, 3 ] | ||
@@ -6,2 +6,3 @@ ℹ︎ a simple message of type log { coloredOutput: false } [ 1, 2, 3 ] | ||
a simple message of type print { coloredOutput: false } [ 1, 2, 3 ] | ||
✔ ︎ a simple message of type success { coloredOutput: false } [ 1, 2, 3 ] | ||
✔ ︎ a simple message of type success { coloredOutput: false } [ 1, 2, 3 ] | ||
⚠︎ a simple message of type warn { coloredOutput: false } [ 1, 2, 3 ] |
@@ -44,4 +44,7 @@ describe( 'clix-logger', function () { | ||
//require('fs').writeFileSync('specs/fixtures/complex-objects.txt', lines.join('\n')); | ||
var expected = require( 'fs' ).readFileSync( 'specs/fixtures/complex-objects.txt', { | ||
l.warn( 'a', 'simple', 'message', 'of', 'type', 'warn', { | ||
coloredOutput: false | ||
}, [ 1, 2, 3 ] ); | ||
var expected = require( 'fs' ).readFileSync( './specs/fixtures/complex-objects.txt', { | ||
encoding: 'utf8' | ||
@@ -77,5 +80,6 @@ } ); | ||
l.success( 'a', 'simple', 'message', 'of', 'type', 'success' ); | ||
l.warn( 'a', 'simple', 'message', 'of', 'type', 'warn' ); | ||
var expected = [ | ||
' ✔ ︎ a simple message of type ok', | ||
' ❖ a simple message of type ok', | ||
' ▸ a simple message of type subtle', | ||
@@ -85,3 +89,4 @@ ' ℹ︎ a simple message of type log', | ||
'a simple message of type print', | ||
' ✔ ︎ a simple message of type success' | ||
' ✔ ︎ a simple message of type success', | ||
' ⚠︎ a simple message of type warn' | ||
]; | ||
@@ -116,8 +121,10 @@ | ||
l.success( 'a', 'simple', 'message', 'of', 'type', 'success' ); | ||
l.warn( 'a', 'simple', 'message', 'of', 'type', 'warn' ); | ||
var expected = [ | ||
' ✔ ︎ a simple message of type ok', | ||
' ❖ a simple message of type ok', | ||
' ✘ a simple message of type error', | ||
'a simple message of type print', | ||
' ✔ ︎ a simple message of type success' | ||
' ✔ ︎ a simple message of type success', | ||
' ⚠︎ a simple message of type warn' | ||
]; | ||
@@ -152,4 +159,6 @@ | ||
l.success( 'a', 'simple', 'message', 'of', 'type', 'success' ); | ||
l.warn( 'a', 'simple', 'message', 'of', 'type', 'warn' ); | ||
var expected = require( 'fs' ).readFileSync( 'specs/fixtures/colored-output.txt', { | ||
//require('fs').writeFileSync('./specs/fixtures/colored-output.txt', lines.join('\n')); | ||
var expected = require( 'fs' ).readFileSync( './specs/fixtures/colored-output.txt', { | ||
encoding: 'utf8' | ||
@@ -156,0 +165,0 @@ } ); |
@@ -1,3 +0,2 @@ | ||
var l = require( './index' )( { coloredOutput: true } ); | ||
var l = require( './logger' ); | ||
l.ok( 'a', 'simple', 'message', 'of', 'type', 'ok', { | ||
@@ -26,1 +25,5 @@ coloredOutput: false | ||
}, [ 1, 2, 3 ] ); | ||
l.warn( 'a', 'simple', 'message', 'of', 'type', 'error', { | ||
coloredOutput: false | ||
}, [ 1, 2, 3 ] ); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77334
14
237