-
-
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
docs(schedule): logging && args #2091
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2091 +/- ##
=======================================
Coverage 99.59% 99.59%
=======================================
Files 29 29
Lines 743 743
=======================================
Hits 740 740
Misses 3 3 Continue to review full report at Codecov.
|
docs/source/zh-cn/basics/schedule.md
Outdated
|
||
执行日志会输出到 `${appInfo.root}/logs/egg-schedule.log`,你也可以通过 `config.customLogger.scheduleLogger` 来自定义。 | ||
|
||
在任务中也可以通过 `ctx.loggers.scheduleLogger.info()` 来记录日志。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有一个问题,这里 scheduleLogger.error 不会 redirect 到 common-error 了,我之前以为只是准备内部用的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有的, corelogger 还打着
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
喔,手动打就有问题了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好像 logger 现在不支持 2 边同时打,redirect 后就只在另一边了。
那我先干掉这段吧。
PS:可以考虑提供 app.Schedule
来给用户继承,里面可以有 this.logger
docs(schedule): logging && args (#2091)
Checklist
npm test
passesAffected core subsystem(s)
Description of change