zhutik / adyen-api-go

[Deprecated] Adyen API Library for GO
https://godoc.org/github.com/zhutik/adyen-api-go
MIT License
22 stars 12 forks source link

Add simple log levels and update default to errors and informational #55

Closed zhutik closed 6 years ago

zhutik commented 6 years ago

Add simple log levels and update default to errors and informational

Simple implementation inspired from https://github.com/stripe/stripe-go, so library logging is not tied to any 3rd party implementation

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-1.7%) to 65.0% when pulling bb81ca4b17a7402528b1b4c38defe416da5b1646 on feature/loglevels into b5dc6591b2449ee09a489ae6fdc7bce6110786e5 on master.

zhutik commented 6 years ago

My intent was to solve it as simple as possible, especially same approach is used in stripe library :)

For sure, we can find a better solution to check given log level in one place in the code. Given it's currently used in 2 methods only, I don't think it's a big issue to have ifs in code, but let's try to re-work to find nicer solution

zhutik commented 6 years ago

Not needed due to merging of https://github.com/zhutik/adyen-api-go/pull/57/files