打印到console的日志添加时间戳,添加标志位区分development和production #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bonjour,非常感谢这个开源项目,让我学到了很多东西。另外考虑到业务日志在发布后不打印到console这个需求,我加入了flag供区分,只有处于开发环境才会打印到console。此外输出到console的日志很多情况下都需要时间戳以直观发现业务耗时,比如是否在某个流程停留过久的问题。所以在输出到console的时候,我加入了一个简单的时间戳(localTime)供参考。再次感谢您维护这个开源项目,祝生活愉快,Je te souhaite une belle vie.