How to Log in SailsJS

前端 未结 2 1808
醉话见心
醉话见心 2021-02-13 04:57

What is the actual syntax to log in SailsJS?

Docs don\'t have anything, but found the following line in the site\'s roadmap

\"Pull out Sails.log (

2条回答
  •  被撕碎了的回忆
    2021-02-13 05:34

    To extend on the Scott Answer, dont forget to add the filePath: property to log.js file... otherwise it will not work :)

    So it should be something like:

    log: {
    level: 'info',
    maxSize: 1000,
    filePath: 'c://serverlogs/mylogfilename.log'
    

    Answer is changed based on Joseph question.

提交回复
热议问题