Skip to content

Commit

Permalink
New syntax for latest Winston
Browse files Browse the repository at this point in the history
  • Loading branch information
marktheunissen committed May 15, 2014
1 parent f038b6f commit dd760c4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ winston.log('error', 'MESSAGE=Multiple messages can be sent', {
var transport_instance = new (journald_transport.Journald)({
"default_meta": {"SYSLOG_IDENTIFIER": "test"},
"priority_map": {"debug": 7, "fatal": 1}
})
var log = new winston.Logger(transports: [ transport_instance ])
log.debug("Something trivial", {ANOTHER_KEY: "ANOTHER_VALUE"})
log.fatal("This is bad news")
});
var log = new (winston.Logger)({transports: [ transport_instance ]});
log.debug("Something trivial", {ANOTHER_KEY: "ANOTHER_VALUE"});
log.error("This is bad news", {PRIORITY: "3"});
log.error("This is a warning", {PRIORITY: "5"});


// Now log directly using the journald log, you can pass as many string
Expand Down

0 comments on commit dd760c4

Please sign in to comment.