I build async task in a Mix task a little bit like this:
Task.async(fn -> MyApp.work() end)
This work function sometimes uses Mix.shell().info()
to print informations, but I can make it silence using Mix.shell(Mix.Shell.Quiet)
, like this:
Task.async(fn ->
Mix.shell(Mix.Shell.Quiet)
MyApp.work()
end)
Is there something how I can make also Logger.info()
output to not appear? Also maybe sometimes IO.puts
? I want this task to be silent. No logs, no STDOUT. Is this possible?