Phoenix删除[调试]日志记录 [英] Phoenix remove [debug] logging
问题描述
运行phoenix服务器时,我得到了我不想要的[debug]
日志(蓝色日志).
When running a phoenix server, I am getting [debug]
logs which I would like to not have (the logs in blue).
如何更改我的config
以摆脱这些问题
How can I alter my config
to get rid of these
推荐答案
您可以将dev
中的日志级别设置为高于debug
,这将使Logger不打印任何debug
消息. debug
上方的级别为info
.您可以通过将其添加到config/dev.exs
来设置:
You can set the log level in dev
to be higher than debug
which will make Logger not print any debug
messages. The level just above debug
is info
. You can set that by adding this to config/dev.exs
:
config :logger, level: :info
如果您已经有config :logger
行,则只需在其末尾添加level: :info
.您必须重新启动应用程序才能使此操作生效.
If you already have a config :logger
line, you can just add level: :info
at the end of it. You will have to restart your application for this to take effect.
这篇关于Phoenix删除[调试]日志记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!