我正在尝试将Logger.debug/1
用于我的web项目。即使我添加了/ myApp/config中的配置文件(config.exs),我也无法通过此错误消息。Logger not working Elixir
** (CompileError) web/controllers/api/app_controller.ex:36: you must require Logger before invoking the macro Logger.debug/1
我在最后添加了这个特定的配置。
config :logger,
backends: [:console],
compile_time_purge_level: :info
我带的帮助,使这除了从http://elixir-lang.org/docs/master/logger/Logger.html
我认为Zepplock的答案涵盖了这个很好。 –
我同意@onoriocatenacci – srajappa