Fl4m3Ph03n1x

Fl4m3Ph03n1x

Background

I have an app that I am trying to start via iex -S mix, but I am unable to.

Error

Upon running the previous command I get the following error:

** (Mix) Could not start application logger: Logger.App.start(:normal, []) returned an error: shutdown: failed to start child: Logger.BackendSupervisor
    ** (EXIT) an exception was raised:
        ** (MatchError) no match of right hand side value: {:error, {{{:case_clause, {:EXIT, {:undef, [{LoggerFileBackend, :init, [{LoggerFileBackend, :deals_logger}], []}, {:gen_event, :server_add_handler, 4, [file: 'gen_event.erl', line: 473]}, {:gen_event, :handle_msg, 6, [file: 'gen_event.erl', line: 318]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}}}, [{Logger.Watcher, :init, 1, [file: 'lib/logger/watcher.ex', line: 28]}, {:gen_server, :init_it, 2, [file: 'gen_server.erl', line: 374]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 342]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}, {:child, :undefined, {LoggerFileBackend, :deals_logger}, {Logger.Watcher, :start_link, [{Logger, {LoggerFileBackend, :deals_logger}, {LoggerFileBackend, :deals_logger}}]}, :transient, 5000, :worker, [Logger.Watcher]}}}
            (logger) lib/logger/backend_supervisor.ex:14: anonymous fn/2 in Logger.BackendSupervisor.start_link/1
            (elixir) lib/enum.ex:1940: Enum."-reduce/3-lists^foldl/2-0-"/3
            (logger) lib/logger/backend_supervisor.ex:13: Logger.BackendSupervisor.start_link/1
            (stdlib) supervisor.erl:379: :supervisor.do_start_child_i/3
            (stdlib) supervisor.erl:365: :supervisor.do_start_child/2
            (stdlib) supervisor.erl:349: anonymous fn/3 in :supervisor.start_children/2
            (stdlib) supervisor.erl:1157: :supervisor.children_map/4
            (stdlib) supervisor.erl:315: :supervisor.init_children/2
            (stdlib) gen_server.erl:374: :gen_server.init_it/2
            (stdlib) gen_server.erl:342: :gen_server.init_it/6
            (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3

My project has several dependencies, some of them from private git repositories that also use logger, but I never had this issue and I added logger to the extra_applications part of the mix.exs file.

extra_applications: [:logger, :runtime_tools, :some_app]

Versions:

elixir 1.8.1-otp-21
erlang 21.2

What could be causing this?

Showing Posts 1 to 2

NobbZ

NobbZ

This is not part of the regular :logger application. Perhaps you are missing :logger_file_backend in your list of dependencies? Or you simply need to remove that backend from your configuration.

josevalim

josevalim

Creator of Elixir

I have also improved the error in master. For an invalid backend OMG, it will now say:

** (Mix) Could not start application logger: Logger.App.start(:normal, []) returned an error: shutdown: failed to start child: Logger.BackendSupervisor
    ** (EXIT) an exception was raised:
        ** (RuntimeError) EXIT when installing backend OMG: an exception was raised:
    ** (UndefinedFunctionError) function OMG.init/1 is undefined (module OMG is not available)
        OMG.init(OMG)
        (stdlib) gen_event.erl:473: :gen_event.server_add_handler/4
        (stdlib) gen_event.erl:318: :gen_event.handle_msg/6
        (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews