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
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
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
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)







