cdn
cdn copied to clipboard
Add a DEBUG option
Gorjun has no DEBUG option. But has a logger that can be set to this level of verbosity. This should be set and then in the relevant parts we should add some entry for the self explanation of what is happening inside gorjun
We are now using logger for another golang based project - Subutai CLI
Debug output of this program looks the following way:
So the same approach can be applied in Gorjun.
For example, these lines of code provide debug output that is hidden in higher loglevel, but could be displayed with debug option: https://github.com/subutai-io/agent/blob/master/agent/agent.go#L135-L137
Switching of the log level can be done like this: https://github.com/subutai-io/agent/blob/master/main.go#L28
Added in refactored CDN.