kshnurov / mandrill_dm

A basic Mandrill delivery method for Rails.
MIT License
46 stars 45 forks source link

Logging #53

Closed Tensho closed 7 years ago

Tensho commented 7 years ago

Guys, what do you think if we add logging system to this library? Sometimes it's worth to now what's going on at low level interaction with Mandrill API. Unfortunately, the api-mandrill gem itself doesn't have ability to log it's work. I know that's not very appropriate abstraction level to do such things in mandrill_dm, but maybe we could at least log api call parameters and concise result. If you find this idea reasonable, let's proceed the discussion. Also I'm happy to contribute, but I'd like to be referred to good example of logging in other libraries.

kshnurov commented 7 years ago

Why would you need that? There's a full API Logs in Mandrill - https://mandrillapp.com/settings/api

Tensho commented 7 years ago

Because I can see there only failed API calls, but it's rather useful to know, what's going on under the hood from your side even in non-failed circumstances, as far as mandrill_dm gives you some abstraction layer. I believe that every system should provide information about it's state in some way. Of course I could enable Excon DEBUG mode, for example, but it's to low level.

I'm curious, why api-mandrill gem doesn't have logging capabilities?

kshnurov commented 7 years ago

Scroll down, there are successful calls ;)

Tensho commented 7 years ago

I'm an idiot, sorry. That's quite enough to be informed. Feel free to close this issue.

spovich commented 7 years ago

@Tensho you can close issues that you open, but since I'm commenting here, I'll close it.

Tensho commented 7 years ago

After some time of working with Mandrill API Log I'm confident to say that provided search capabilities are far from perfect. It's hard to find needed in the tons of calls (they don't distinguish them as in Outbound Activity panel with filters help). So could my request of logging be considered again ^_^ Don't you guys struggle without sensible logs?

Tensho commented 7 years ago

@kshnurov, @spovich, any thoughts?

Tensho commented 7 years ago

Ping

spovich commented 7 years ago

@Tensho I don't have an issue with logs and hasn't been a problem for me. I'm open to considering a PR, but by default, it should preserve current behavior (extra logging would need to explicitly set in the settings)