yassine

yassine

Logging with elixir and elasticsearch

i am working on a phoenix application, and i want to get logs stored in elasticsearch.

it is possible to do that with maybe some elixir libraries or some functions ?

if that true, can some one givs me some ideas please !

Marked As Solved

hauleth

hauleth

Oh, I have read it as you want to send logs to the ES, as otherwise it has nothing to do with the logging. What you are looking for is how to query ElasticSearch, and for that you have some Hex packages. Now you need to pick any of them that will work for you and just query the DB fetching data you need.

However it still has nothing to do with logging, as the source of the data and kind of data you are trying to fetch is irrelevant there.

Also Liked

yassine

yassine

oh yeah, i knew it i didn’t correctly express for what i want i am sorry about that, so i will try using the Hex packages.
thanks a lot.

hauleth

hauleth

Yes, it is. There are 2 approaches possible:

  • Easy: Use syslog/journal/file logging and then dispatch logs to the ES (or any other service) from there
  • Medium: Implement Elixir Logger Backend (or find existing one)
  • Hard: Implement Erlang Logger Handler (I doubt that you will find one that is already done)

Where Next?

Popular in Questions Top

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
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
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
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
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
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
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 ...
1144 55125 245
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
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
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42716 114
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
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement