The @dialyzer attribute documentation is here . You will need to search the page a bit to find it.
In this particular case, I consider the following module attribute:
@dialyzer {:no_return, your_function_name: 1}
Gotta give you what you want. Just put it at the top of each module where you use Logger like this:
defmodule MyLogging do @dialyzer {:no_return, your_function_name: 1} . . .
Please note that you can only disable warnings for functions in the current module. That is, it is apparently impossible to disable warnings for functions in another module (for example, Logger.info: 1 ).
source share