Silence Phoenix LiveView logs

I’m trying to silence the phoenix liveview logs, or at least change them from :info to :debug so they don’t appear in production. The logs I’m referring to are:

19:58:49.505 [info] CONNECTED TO Phoenix.LiveView.Socket in 161µs 
 Nov 22 12:58:49   web.1  |   Transport: :websocket 
 Nov 22 12:58:49   web.1  |   Serializer: Phoenix.Socket.V2.JSONSerializer 
 Nov 22 12:58:49   web.1  |   Connect Info: %{} 
 Nov 22 12:58:49   web.1  |   Parameters: %{"vsn" => "2.0.0"} 

Is there an easy way to do this? I don’t see anything regarding logs in the live view documentation.

Info is very verbose, generally not good to have the logs set to that in production (except for short testing sessions). I don’t know if their level can be changed though. They might belong better in :debug though actually, or at least some of those lines…

Thanks for the response. I’ll up my productions logs to :warn for now

1 Like