dexter icon indicating copy to clipboard operation
dexter copied to clipboard

Evaluate the future of this library

Open matthewmcgarvey opened this issue 5 years ago • 1 comments

My understanding of history is that this library was made in a time where Crystal's Log class was not very robust and this library added functionality that was missing. (From what I've heard) The Log class is now better so we need to figure out what Dexter should look like going into the future and if there is even a place for it.

Should Dexter just be a library of formatters? Lucky has some formatters so should they be moved over or is it even worth it?

matthewmcgarvey avatar Dec 26 '20 19:12 matthewmcgarvey

Exactly. We originally had the logging in Lucky with some of the formatters in there. Then we added Dexter to handle wrapping up some of that stuff and to make up for things the Crystal logger didn't do at that time.

Now that the Crystal Log can sort of handle that, Dexter can just be a log formatter. Though, the Crystal Log module is a little weird and confusing. I still don't quite get some of it's API with the "backend" and "dispatcher" stuff.

Like in this example:

Log.setup do |c|
   backend = Log::IOBackend.new

   c.bind "*", :warn, backend
   c.bind "db.*", :debug, backend
   c.bind "*", :error, ElasticSearchBackend.new("http://localhost:9200")
end

I don't understand what it's doing, and each time I want to use this, I'm forced to go and look up the docs to remember what it's doing. Logging shouldn't be that difficult.

I'd be down for just making Dexter a formatter with some simple wrapper to make the Log interface easier to use.

jwoertink avatar Dec 28 '20 17:12 jwoertink