yassine

yassine

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 !

Showing Posts 1 to 4

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

yassine OP

i am trying to use the Medium way, i searched for it and i found this documentation: Logger — Logger v1.11.4 (hexdocs.pm) . But i didn’t understand it very well, maybe i didn’t clarify what i want exactly. i need firstval to connect to elasticsearch using the correct URL + port number + username + password, then get logs from there and display them in my application.
that’s possible with the approaches you sended ? ( i appreciate your help thanks)

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.

yassine

yassine OP

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.

— All posts loaded —

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
matt-savvy
Anyone here using Honeybadger? My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of Bandit.HTTPError...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews