-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
agent logger的初始化在configWillLoad之前进行了 #3548
Comments
logger 的配置,直接在 config 里面修改就好了,没必要到 boot 这里改 |
我们这边日志目录的规则是 |
killagu
added a commit
that referenced
this issue
Apr 1, 2019
killagu
added a commit
that referenced
this issue
Apr 4, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happens?
agent
logger
的初始化在configWillLoad
之前进行了,导致无法在agent.js
的configWillLoad
钩子更改日志的配置最小可复现仓库
https://github.com/sinalvee/eggjs-agent-logger-init-issue
复现步骤,错误日志以及相关配置
agent.js
configWillLoad
钩子修改日志目录app.js
configWillLoad
钩子修改日志目录app
的日志被写到了logs/appDir
中,而agent
的日志目录并没有被更改问题分析
egg
源码中,egg/lib/agent.js
文件_wrapMessenger
方法中使用了this.coreLogger.warn
,因此logger
在configWillLoad
之前就初始化了相关环境信息
The text was updated successfully, but these errors were encountered: