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

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
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
matt-savvy
Anyone here using Honeybadger? My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of Bandit.HTTPError...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
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
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
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews