-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from achohq/color
Add new colors
- Loading branch information
Showing
33 changed files
with
390 additions
and
386 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use strict' | ||
|
||
const acho = require('..') | ||
const log = acho() | ||
|
||
console.log() | ||
|
||
log.info('format text', 'hello world') | ||
log.info('format number interpolation %d', 123) | ||
log.info('format float interpolation %d', 3.14) | ||
log.info('format string interpolation %s', 'hello world') | ||
log.info('format object interpolation %j', { | ||
hello: 'world', foo: 'bar' | ||
}) | ||
|
||
log.info('format beauty object interpolation %J', { | ||
hello: 'world', | ||
foo: 'bar', | ||
deep: { | ||
foo: 'bar', | ||
arr: [1, 2, 3, 4, 5] | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,9 @@ | ||
'use strict' | ||
|
||
var Acho = require('..') | ||
var acho = Acho({ | ||
diff: true, | ||
timestamp: 1000, | ||
upperCase: true, | ||
context: 'generated' | ||
// keyword: 'symbol' | ||
}) | ||
|
||
var levels = Object.keys(acho.types) | ||
|
||
var fixtureObj = { | ||
foo: 'bar', | ||
hello: 'world' | ||
} | ||
|
||
var fixtureArr = [1, 2, 3, 4, 5] | ||
|
||
acho.debug('%j', fixtureObj) | ||
acho.debug(fixtureObj) | ||
acho.debug(fixtureArr) | ||
const acho = require('acho') | ||
|
||
levels.forEach(function (level) { | ||
setInterval(function () { | ||
acho[level]('This is a auto-generated ' + level + ' message') | ||
acho[level](fixtureObj) | ||
}, 1000) | ||
const log = acho() | ||
const types = Object.keys(log.types) | ||
types.forEach(type => { | ||
log[type]('hello world') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict' | ||
|
||
const acho = require('acho') | ||
const skinCli = require('acho-skin-cli') | ||
|
||
const log = acho({ | ||
types: skinCli, | ||
keyword: 'symbol' | ||
}) | ||
|
||
console.log() | ||
|
||
const types = Object.keys(log.types) | ||
types.forEach(type => { | ||
log[type]('hello world') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use strict' | ||
|
||
const acho = require('acho') | ||
const skinCli = require('acho-skin-syslog') | ||
|
||
const log = acho({ | ||
types: skinCli | ||
}) | ||
|
||
console.log() | ||
|
||
const types = Object.keys(log.types) | ||
types.forEach(type => { | ||
log[type]('hello world') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
'use strict' | ||
|
||
const Acho = require('..') | ||
const acho = Acho({ | ||
diff: true, | ||
trace: 1000 | ||
// upperCase: true, | ||
// keyword: 'symbol' | ||
}) | ||
|
||
const levels = Object.keys(acho.types) | ||
|
||
const fixtureObj = { | ||
foo: 'bar', | ||
hello: 'world' | ||
} | ||
|
||
const fixtureArr = [1, 2, 3, 4, 5] | ||
|
||
acho.debug('%j', fixtureObj) | ||
acho.debug(fixtureObj) | ||
acho.debug(fixtureArr) | ||
|
||
levels.forEach(function (level) { | ||
setInterval(function () { | ||
acho[level]('This is a auto-generated ' + level + ' message') | ||
acho[level](fixtureObj) | ||
}, 1000) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict' | ||
|
||
const acho = require('acho') | ||
|
||
const log = acho({upperCase: true}) | ||
const types = Object.keys(log.types) | ||
types.forEach(type => { | ||
log[type]('hello world') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
'use strict' | ||
require('coffee-script/register') | ||
module.exports = require('./lib/Acho') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.