Skip to content

Commit

Permalink
Clarify log level for Phoenix.Channel (#5785)
Browse files Browse the repository at this point in the history
  • Loading branch information
stilist committed May 2, 2024
1 parent b5c7f5b commit d190649
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/phoenix/channel.ex
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,16 @@ defmodule Phoenix.Channel do
## Logging
By default, channel `"join"` and `"handle_in"` events are logged, using
the level `:info` and `:debug`, respectively. Logs can be customized per
event type or disabled by setting the `:log_join` and `:log_handle_in`
options when using `Phoenix.Channel`. For example, the following
configuration logs join events as `:info`, but disables logging for
the level `:info` and `:debug`, respectively. You can change the level used
for each event, or disable logs, per event type by setting the `:log_join`
and `:log_handle_in` options when using `Phoenix.Channel`. For example, the
following configuration logs join events as `:info`, but disables logging for
incoming events:
use Phoenix.Channel, log_join: :info, log_handle_in: false
Note that changing an event type's level doesn't affect what is logged,
unless you set it to `false`, it affects the associated level.
"""
alias Phoenix.Socket
alias Phoenix.Channel.Server
Expand Down

0 comments on commit d190649

Please sign in to comment.