Hi folks,
New user of CloudQuery here, and we wrote a source plugin using the Go SDK. I need to skip and log certain errors from the API we are querying. Is there any example of logging from a plugin available?
Hi folks,
New user of CloudQuery here, and we wrote a source plugin using the Go SDK. I need to skip and log certain errors from the API we are querying. Is there any example of logging from a plugin available?
Hi @musical-ray - that is great to hear! Let me find an example for you.
Here is an example:
In this case, if the API returns a certain error, then we will log a warning (but it could be an Error()
) and return without an error.
The thing that is important to do is add the logger to the plugin Client so that all of the resources can access it during the sync:
tysm! Will try it now
Great! Let me know if you have any questions or run into any issues!
Worked perfectly. Thanks again!