Skip to content

Commit

Permalink
small bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
mahnunchik committed May 23, 2013
1 parent ef408be commit 91e2ad9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions example/example.js
@@ -0,0 +1,3 @@

var logger = require('../')('example');
logger.info("example message", {meta: "some metadata"});
4 changes: 2 additions & 2 deletions src/mag.coffee
Expand Up @@ -224,15 +224,15 @@ exports.formats = formats =
* https://logstash.jira.com/browse/LOGSTASH-675
###
file: (data)->
return JSON.stringify {
return JSON.stringify({
'@timestamp': data.timestamp
'@tags': [data.tag, data.pid, data.levelName]
'@source': "#{data.hostname} #{data.tag}[#{data.pid}]"
'@message': data.message
'@fields':
level: data.level
levelName: data.levelName
}
}) + "\n"

if istty == true
exports.format = formats.console
Expand Down

0 comments on commit 91e2ad9

Please sign in to comment.