WebsockexNova.Defaults.DefaultLoggingHandler (WebsockexNova v0.1.0)
View SourceDefault implementation of the LoggingHandler behavior for WebsockexNova.
This module provides standardized logging for connection, message, and error events using Elixir's Logger. It supports configurable log levels and formats (plain or JSON).
Configuration
The log level and format can be set in the handler state as:
%{log_level: :info, log_format: :plain}
If not set, defaults are :info and :plain. All logging state is now stored in the canonical WebsockexNova.ClientConn struct under the :logging field.
Summary
Functions
Initializes the DefaultLoggingHandler state in the canonical struct. Returns {:ok, conn} where conn is the canonical struct with logging config set.
Functions
@spec logging_init(map()) :: {:ok, WebsockexNova.ClientConn.t()}
Initializes the DefaultLoggingHandler state in the canonical struct. Returns {:ok, conn} where conn is the canonical struct with logging config set.