Phoenix删除[调试]日志记录 [英] Phoenix remove [debug] logging

查看:432
本文介绍了Phoenix删除[调试]日志记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆