arpan

arpan

Best ways to process phoenix webserver logs in production

Hi, can someone guide me on what are the best ways to process and view logs produced by a phoenix server in production?

I use mix releases and use edeliver to deploy them to the production AWS instances.

Things that I have seen so far…

  • By default, when using a release the logs are generated and kept inside a folder in the release directory somewhere(I don’t remember the path).
    They are some sort of logs generated by erlang I think.
    I saw about 5 log files that are generated and the logs are written to one of the files at once(there is some sort of log rotation I think).

  • Logs are also written to syslog

  • If we use Nginx we also get Nginx logs however they are not as detailed as logs produced directly by the phoenix server.

Now, I recently read about the ELK(Elasticsearch Logstash Kibana) stack which is very popular for analyzing logs, and does many other cool stuff, and I very interested in setting this up for phoenix.

However, I think for this to work, Logstash needs to parse the logs for which it uses patterns.
Can anyone point me to how to configure logstash to parse phoenix server logs?

At first, my idea was to use logstash to parse all the logs produced by erlang and kept in a folder that I talked about earlier. I would use a logstsash configuration that uses some wildcard like /logs/* to load all log files in the folder. So no matter in which log file the logs are written, logstash would catch them and send them to elastic search.

Later, I also found this, which looks very interesting.

I don’t much experience with loggers, what are custom logger backends?

This is all I have found, I am a noob on this aspect, and anyone guides me or give any suggestions or point me to some good blogs, links, etc what are my best options here?

Where Next?

Popular in Questions 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
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
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
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 Postgres...
New
JulienCorb
I am trying to implement my new.html.eex file to create new posts on my website. new.html.eex: <h1>Create Post</h1> <%= ...
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
JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
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
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

Other popular topics Top

lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
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 Postgres...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
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
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 48342 226
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement