Created
November 28, 2017 14:58
-
-
Save vorandrew/bdec05eeb832a3ebc5a808430d5a755f to your computer and use it in GitHub Desktop.
Logging is not working
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
$ node index.js | |
[-isodate-] INFO init start | |
[-isodate-] INFO init end | |
123 |
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 seneca = require('seneca')() | |
seneca.add({ cmd: 'salestax' }, function (args, callback) { | |
var rate = 0.23 | |
var total = args.net * (1 + rate) | |
callback(null, { total: total }) | |
}) | |
seneca.act({ cmd: 'salestax', net: 100 }, function (err, result) { | |
if (err) return console.error(err) | |
console.log(result.total) | |
}) | |
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
123 | |
{"kind":"notice","notice":"hello seneca 7s5nvcfmqcty/1511881045504/14997/3.4.3/-","level":"info","seneca":"7s5nvcfmqcty/1511881045504/14997/3.4.3/-","when":1511881045570} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment