我正在嘗試將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