Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clix-logger

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clix-logger - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

logger.js

9

changelog.md
# 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 @@

 ✔ ︎ a simple message of type ok
 ❖  a simple message of type ok
 ▸  a simple message of type subtle

@@ -6,2 +6,3 @@  ℹ︎  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

@@ -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 ] );
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc