-
Notifications
You must be signed in to change notification settings - Fork 42
How to change the log level for go-cloudstack module? #120
Comments
I'm afraid this module currently doesn't log much. I guess the one thing that should be reasonable easy to add is logging API requests and responses. Is that what you are looking for? |
Hi, @svanharmelen , yes, at least for most critical async jobs. Otherwise while debugging the docker machine cloudstack driver it's quite hard to understand what is happening behind the scenes especially under high load. |
@svanharmelen I also think that adding logging would be useful, but as there's never consensus on what to log or which logging library to use ( IMHO, the best would be to also add an optional A possible signature for these hooks could be: // PreRequestHook would be called in newRequest, just before the HTTP request call.
type PreRequestHook func(ctx context.Context, api string, params url.Values)
// PostRequestHook would be called in each generated client function,
// just after the Unmarshal step.
type PostRequestHook func(ctx context.Context, rawResp json.RawMessage, err error, resp interface{}) I can contribute and submit a PR if you are ok with that. |
I'm going to close this issue as I'm about to archive this repository. Development of this package has been moved to the Apache Foundation. Please find the new home for this package here: https://github.com/apache/cloudstack-go |
Hi,
while doing problem analysis for the docker machine cloud stack driver, which depends on go-cloudstack, I would like to know whether it's possible to increase the log level of this module (at runtime either statically reaching out from the driver code).
The text was updated successfully, but these errors were encountered: