Created
November 23, 2014 23:19
-
-
Save gigonaut/4bfccbec9b44b1b59302 to your computer and use it in GitHub Desktop.
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
var bunyan = require('bunyan'); | |
var Stache = require('mustache'); | |
var formatter = function(data) { | |
var str = ""; | |
str += '-_-_-_-_-_-_-_,------, \n'; | |
str += '_-_-_-_-_-_-_-| /\\_/\\\n'; | |
str += '-_-_-_-_-_-_-~|__( ^ .^) \n'; | |
str += '_-_-_-_-_-_-_-"" "" \n'; | |
str += "message(the real honest to goodness message: " + data.msg + ")\n"; | |
return str; | |
}; | |
var mustacheFormatter = function(data) { | |
return Stache.render("<h1>{{msg}}</h1>", data); | |
}; | |
var log = bunyan.createLogger({ | |
name: "foo", | |
streams: [ | |
{ | |
stream: process.stderr, | |
level: "debug", | |
format: formatter | |
}, | |
{ | |
stream: process.stderr, | |
level: "debug", | |
format: mustacheFormatter | |
} | |
] | |
}); | |
log.info('fun'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment