Today I Learned

hashrocket A Hashrocket project

Compile time purge level

Elixir can conditionally remove log statements of the form Logger.debug/2 to Logger.error/2 at compile time.

config :logger, compile_time_purge_level: :info

In this configuration, logger statements like Logger.debug("something inconsequential happened") will be compiled out altogether.

See More #elixir TILs
Looking for help? At Hashrocket, we 💜 Elixir! From our many Elixir client projects, to sponsoring the Chicago Elixir Meetup, to the source code for this application, we are invested in this community. Contact us today to talk about your Elixir project.