How do i log something in meteor?

后端 未结 3 2036
情歌与酒
情歌与酒 2020-12-31 07:36

Can I use something like winston npm in the underlying .meteor/local/build/server/node_modules?

or even node-loggly

3条回答
  •  灰色年华
    2020-12-31 08:16

    There is a package called logging however in the comments it mentions it is just temporary. It exposes a method called Meteor._debug which basically uses console.log which works both serverside and also client side. So it might work better to use that for now.

    You could however use some other logging plugin if you like, either put it in a package or use the npm's or include the javascript in your template for logging.

提交回复
热议问题