This pull request fixes a small issue that would cause the following Resty warning (raised here) to be printed when Client.SetDebug(...) is called multiple times:
WARN RESTY Overwriting an existing on-request-log callback from=github.com/linode/linodego.(*Client).SetDebug.(*Client).sanitizeAuthorizationHeader.func1 to=github.com/linode/linodego.(*Client).SetDebug.(*Client).sanitizeAuthorizationHeader.func1
This works by initializing the log hook during client creation rather than when calling SetDebug(...).
✔️ How to Test
The following test steps assume you have pulled down this PR locally.
Manual Testing
In a linodego sandbox environment (e.g. dx-devenv), run the following:
📝 Description
This pull request fixes a small issue that would cause the following Resty warning (raised here) to be printed when
Client.SetDebug(...)
is called multiple times:This works by initializing the log hook during client creation rather than when calling
SetDebug(...)
.✔️ How to Test
The following test steps assume you have pulled down this PR locally.
Manual Testing