ebengt

ebengt

Mix release in prod creates bad sys.config

Greetings,

I will try to make a small example, but first I would like to check that this is not a know bug. Which should have been possible to find here…

Elixir 1.15, Mix 1.15.6 (compiled with Erlang/OTP 26), umberella project
MIX_ENV=prod mix release
creates a sys.config with, among others, {logger, [... ,{metadata,[mfa]}]}
Trying to start this release:

=CRASH REPORT==== 1-Nov-2023::10:07:38.785472 ===
  crasher:
    initial call: application_master:init/4
    pid: <0.1827.0>
    registered_name: []
    exception exit: {bad_return,
                     {{'Elixir.Logger.App',start,[normal,[]]},
                      {'EXIT',
                       {badarg,
                        [{maps,from_list,
                          [[mfa]],
                          [{error_info,#{module => erl_stdlib_errors}}]},
                         {'Elixir.Enum',into_map,1,
                          [{file,"lib/enum.ex"},{line,1521}]},
                         {'Elixir.Logger.App',start,2,
                          [{file,"lib/logger/app.ex"},{line,40}]},
                         {application_master,start_it_old,4,
                          [{file,"application_master.erl"},{line,293}]}]}}}}
      in function  application_master:init/4 (application_master.erl, line 142)

MIX_ENV=dev does not have the problem, neither did prod in Elixir 1.14.

First Post!

josevalim

josevalim

Creator of Elixir

It seems you have invalid Logger configuration.

You were defining config :logger, metadata: [:mfa], but this has no meaning on previous Elixir versions. Elixir v1.15 assigns a meaning to this key to specify key-value pairs of global metadata.

You probably want to move your metadata key to a backend/handler, such as config :logger, :console, metadata: [:mfa].

Where Next?

Popular in Questions Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
LegitStack
I’m hoping you guys can give me some general advice and perhaps code examples if you’re feeling up to it. I’m very interested in Elixir,...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
mathew4509
I have a list say x = ["23gh", "56kh", "97mh"] I would like to pass each element to Val in each iteration. Say, in iteration 1 -------...
New
gonzofish
I’m currently trying to understand how to join three tables using Ecto. All the examples I’ve seen use 2, so maybe I’m just missing somet...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
Exadra37
Sometimes I want to check if the input into a function is not a blank string. My first approach: defmodule Example do def do_stuff(s...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New

Other popular topics Top

sergio
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
273 38985 115
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement