【问题标题】:how to remove sails js default log messages如何删除sails js默认日志消息
【发布时间】:2016-11-02 10:46:24
【问题描述】:

请如何删除在“起航”时显示的此默认日志消息,这些消息也写入我的外部日志文件:

info: Starting app...

debug: Deprecation warning: Support for `sails.config.sockets.onConnect` will be
 removed in an upcoming release. See the v0.11 migration guide for more informat
ion and alternate options.
info:
info:                .-..-.
info:
info:    Sails              <|    .-..-.
info:    v0.12.4             |\
info:                       /|.\
info:                      / || \
info:                    ,'  |'  \
info:                 .-'.-==|/_--'
info:                 `--'-------'
info:    __---___--___---___--___---___--___
info:  ____---___--___---___--___---___--___-__
info:
info: Server lifted in `E:\Orange\sailsJS_workspace\server`
info: To see your app, visit http://localhost:1337
info: To shut down Sails, press <CTRL> + C at any time.
debug: -------------------------------------------------------
debug: :: Wed Nov 02 2016 12:03:45 GMT+0200 (Egypt Standard Time)
debug: Environment : development
debug: Port        : 1337
debug: -------------------------------------------------------

【问题讨论】:

标签: node.js sails.js


【解决方案1】:

只需添加:

noShip: true

提交:config/log.js

对于其他使用“级别”播放的默认日志消息,它记录在文件开头的 cmets 中。

【讨论】:

    【解决方案2】:

    在log.js中设置level:silent

    例如:

    module.exports.log = {
        custom: blahblahBlah,
        inspect: false
        level: 'info'
    };
    

    【讨论】:

      猜你喜欢
      • 2016-08-18
      • 1970-01-01
      • 1970-01-01
      • 2019-09-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-05
      相关资源
      最近更新 更多