Skip to content

Failure while translating Erlang's logger event (gen_statem) #13682

Closed
@ruslandoga

Description

@ruslandoga

👋

Elixir and Erlang/OTP versions

Erlang/OTP 27 [erts-15.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]

Elixir 1.17.1 (compiled with Erlang/OTP 27)

Operating system

mac

Current behavior

iex(1)> Mix.install [:postgrex]
:ok
iex(2)> Postgrex.start_link(backoff_type: :stop, max_restarts: 0, database: "plausible_dev")
{:ok, #PID<0.198.0>}

results in "Failure while translating Erlang's logger event"

01:40:10.853 [error] Postgrex.Protocol (#PID<0.200.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (localhost:5432): connection refused - :econnrefused

01:40:10.855 [error] Failure while translating Erlang's logger event
** (MatchError) no match of right hand side value: %{label: {:gen_statem, :terminate}, name: #PID<0.200.0>, reason: {:error, %DBConnection.ConnectionError{message: "tcp connect (localhost:5432): connection refused - :econnrefused", severity: :error, reason: :error}, [{DBConnection.Connection, :handle_event, 4, [file: ~c"lib/db_connection/connection.ex", line: 122, error_info: %{module: Exception}]}, {:gen_statem, :loop_state_callback, 11, [file: ~c"gen_statem.erl", line: 3115]}, {:proc_lib, :init_p_do_apply, 3, [file: ~c"proc_lib.erl", line: 329]}]}, log: [], state: Postgrex.Protocol, queue: [internal: {:connect, :init}], modules: [DBConnection.Connection], client_info: :undefined, process_label: :undefined, callback_mode: &DBConnection.Connection.handle_event/4, postponed: [], timeouts: {0, []}, state_enter: false}
    (logger 1.17.1) lib/logger/translator.ex:306: Logger.Translator.report_gen_statem_terminate/2
    (logger 1.17.1) lib/logger/utils.ex:47: Logger.Utils.translate/5
    (logger 1.17.1) lib/logger/utils.ex:25: Logger.Utils.translator/2
    (kernel 10.0) logger_backend.erl:102: :logger_backend.do_apply_filters/4
    (kernel 10.0) logger_backend.erl:87: :logger_backend.apply_filters/4
    (kernel 10.0) logger_backend.erl:33: :logger_backend.log_allowed/3
    (stdlib 6.0) gen_statem.erl:4309: :gen_statem.terminate/7
    (stdlib 6.0) proc_lib.erl:329: :proc_lib.init_p_do_apply/3

** (EXIT from #PID<0.104.0>) shell process exited with reason: killed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions