Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Apr 29, 2016
1 parent efbc12f commit da0bba5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
25 changes: 12 additions & 13 deletions examples/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict'

require('date-utils')
var Acho = require('./index.js')
var Acho = require('..')
var setDateout = require('set-dateout')

var base = Acho()
var base = Acho({})

var diff = Acho({
diff: true
Expand Down Expand Up @@ -49,21 +49,20 @@ var lineBreakTimeout = (function () {
}
})()

messageTimeout('info', 'Simple', base)
messageTimeout('success', 'Tiny', base)
messageTimeout('verbose', 'Customizable', base)
messageTimeout('silly', 'Logger for NodeJS and Browser', base)
messageTimeout('warn', 'in less than...', base)
messageTimeout('error', '10KB!.', base)
messageTimeout('info', 'Hackable', base)
messageTimeout('debug', 'Logging', base)
messageTimeout('warn', 'for NodeJS and Browser', base)
messageTimeout('error', 'in less than', base)
messageTimeout('fatal', '10KB!.', base)

lineBreakTimeout(1)

messageTimeout('info', 'Do you wanna to know more?', base)

lineBreakTimeout()

messageTimeout('success', 'support diff', diff)
messageTimeout('success', 'between messages', diff)
messageTimeout('debug', 'support diff', diff)
messageTimeout('debug', 'between messages', diff)

lineBreakTimeout()

Expand All @@ -77,16 +76,16 @@ messageTimeout('error', 'under production scenario', production)

lineBreakTimeout()

messageTimeout('silly', 'and more more more...', base)
messageTimeout('debug', 'and more more more...', base)

lineBreakTimeout()

messageTimeout('debug', 'string interpolation', base)
messageTimeout('verbose', 'logs align', base)
messageTimeout('debug', 'logs align', base)
messageTimeout('info', 'custom levels and transports', base)
messageTimeout('info', 'object serialization', base)
messageTimeout('info', {foo: 'bar', hello: 'world'}, base)

lineBreakTimeout()

messageTimeout('success', 'https://github.com/Kikobeats/acho', visit)
messageTimeout('debug', 'https://github.com/Kikobeats/acho', visit)
2 changes: 2 additions & 0 deletions examples/levels.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

var Acho = require('..')
var acho = Acho({
diff: true,
timestamp: true,
upperCase: true,
// keyword: 'symbol'
})
Expand Down

0 comments on commit da0bba5

Please sign in to comment.