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

aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
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
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
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
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
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
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
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
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 43757 214
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
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
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" =&gt; #BSON.ObjectId&lt;58eb1a7a9ad169198c3dXXXX&gt;, "email" =&gt; ...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement