我正在尝试使用Logger.debug/1
我的网络项目.即使我确实添加了/ myApp/config中的配置文件(config.exs),我也无法通过此错误消息.
** (CompileError) web/controllers/api/app_controller.ex:36: you must require Logger before invoking the macro Logger.debug/1
Run Code Online (Sandbox Code Playgroud)
我在最后添加了这个特定的配置.
config :logger,
backends: [:console],
compile_time_purge_level: :info
Run Code Online (Sandbox Code Playgroud)
我从http://elixir-lang.org/docs/master/logger/Logger.html获得了帮助
我正在努力Enum.map
.当我向列表的所有元素添加100时,我发现了这个奇怪的输出.
为什么这样输出?事实证明,当我添加100时我得到一个字符串但是当我做其他操作时工作得很好.我摆弄了一些,我仍然得到了这样的意外结果.