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

beno
I will often find my self writing things similar to: case some_value do nil -&gt; something() "" -&gt; something() _ -&gt; somethi...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
tduccuong
Hi, is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
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
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call t...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
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
earth10
Hi, I’m just starting to build a side-project with Elixir and Phoenix and doing some basic test with Elixir alone. What strikes me is th...
New

Other popular topics Top

hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a &gt; b) do {:ok, "a"} end if (a &lt; b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
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
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
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
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
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

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement