gliderlabs / registrator

Service registry bridge for Docker with pluggable adapters
http://gliderlabs.com/registrator
MIT License
4.66k stars 912 forks source link

Add verbose flag for debugging purposes #103

Open hermansc opened 9 years ago

hermansc commented 9 years ago

There's a lot of stuff happening in the background - requests being sent and services created. However, much of it happens without user knowledge and developers wanting to understand why the registrator is not working as expected are forced to add log.Println statements all over.

Instead, I propose a library such as jcelliott/lumber or /alexcesaro/log/stdlog for making logging at different levels.

Using log.Debug() and optionally log.Trace() statements we can even have --verbose=1 and --verbose=2. The "lumber" framework also supports adding prefixes, which I see is done in many of the log statements already (with "registrator: " as the prefix).

progrium commented 9 years ago

Sounds good. I'll look into those.

hermansc commented 9 years ago

After looking at Docker issues I found that they switched to using "logrus" couple of months back:

https://github.com/docker/docker/issues/8761

Logrus: https://github.com/Sirupsen/logrus

progrium commented 9 years ago

Is this what you recommend?

bketelsen commented 9 years ago

+1 for logrus