sails日志到文件 [英] sails logging to file
本文介绍了sails日志到文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以提供一个如何配置sails.js以登录到文件的示例吗?
Can someone provide an example of how to configure sails.js to log to a file?
看起来应该很简单,
我正在查看config / log.js或config / sockets.js文件中的更改。
I'm looking at changes in the config/log.js or the config/sockets.js files.
推荐答案
根据源代码, for v0.9.x ,您只需要在中设置
: filePath
config / log.js
According to the source code, for v0.9.x, you just have to set the filePath
in your config/log.js
:
module.exports = {
log: {
level: 'info',
filePath: 'application.log'
}
};
这篇关于sails日志到文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文