senggen

senggen

How to fix *Bad argument in call to erlang:'++'(<<"xxx/crash.log">>, ".3") in lager_rotator_default:rotate_logfile/2 line 84*

Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]

15:22:35.803 [error] gen_event {lager_file_backend,<<102,105,115,104,95,99,104,97,105,110,46,108,111,103>>} installed in lager_event terminated with reason: bad argument in call to erlang:‘++’(<<“/var/log/xxx/xxx.log”>>, “.198”) in lager_rotator_default:rotate_logfile/2 line 84
15:22:35.803 [error] Lager event handler {lager_file_backend,<<“fish_chain.log”>>} exited with reason {‘EXIT’,{badarg,[{erlang,‘++’,[<<“/var/log/xxx/xxx.log”>>,“.198”],[{error_info,#{module => erl_erts_errors}}]},{lager_rotator_default,rotate_logfile,2,[{file,“/home/gitlab-runner/builds/Zrpgky1W/0/justkey/fish/fish-serv/deps/lager/src/lager_rotator_default.erl”},{line,84}]},{lager_file_backend,write,4,[{file,“/home/gitlab-runner/builds/Zrpgky1W/0/justkey/fish/fish-serv/deps/lager/src/lager_file_backend.erl”},{line,253}]},{lager_file_backend,handle_event,2,[{file,“/home/gitlab-…”},…]},…]}}
15:22:35.804 [error] gen_server lager_crash_log terminated with reason: bad argument in call to erlang:‘++’(<<“/var/log/xxx/crash.log”>>, “.3”) in lager_rotator_default:rotate_logfile/2 line 84
15:22:35.804 [error] CRASH REPORT Process lager_crash_log with 0 neighbours crashed with reason: bad argument in call to erlang:‘++’(<<“/var/log/xxx/crash.log”>>, “.3”) in lager_rotator_default:rotate_logfile/2 line 84
15:22:35.804 [error] Supervisor lager_sup had child lager_crash_log started with lager_crash_log:start_link(“crash.log”, 65536, 10485760, [{hour,0}], 5, lager_rotator_default) at <0.3235.0> exit with reason bad argument in call to erlang:‘++’(<<“/var/log/xxx/crash.log”>>, “.3”) in lager_rotator_default:rotate_logfile/2 line 84 in context child_terminated

Marked As Solved

hauleth

hauleth

Lager expects you to pass Erlang’s string, which is charlist from Elixir. Use ~c"/var/log/…" instead of "/var/log/…" in your configuration.

Where Next?

Popular in Questions Top

JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
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
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
chewm
Hi guys, nice to meet you to the whole forum, I’m new here, I’m trying to configure visual studio code for elixir, right now the intellis...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
Codball
Mix format works fine if run from the cmd. I’ve followed this to facilitate the implementation into VSC which involves downloading an ext...
New
Mooodi
Given a string, how can I get access to its character by index? Enum.at("my_string", 2) doesn't work. Or rather, not char, but a substr...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

Other popular topics Top

JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1140 51847 244
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
beno
I will often find my self writing things similar to: case some_value do nil -&gt; something() "" -&gt; something() _ -&gt; someth...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

We're in Beta

About us Mission Statement