Closed LiPeio-o closed 7 months ago
Thank you for your report. I tested your case and it works as expected. Could you share more details, like how you configured the plugin(i.e, does it attach to some routes, services, or just global)? You could also debug this yourself. Just as an example, try to write a file in this handler to see if it is really executed.
Thanks for reply~ I deployed kong in hybrid mode with a CP node and a DP node, and I installed the plugin to print log on both CP node and DP node. Then I send requests but not found any log in the both two nodes no matter attach plugin to service or global. (I also test deployed in traditional mode, and the plugin works correctly, I can see logs in kong/logs/errors.log). Looking forward to your reply, thank you!
Sorry I missed the important information. You said you are using v0.5.0
. Please change to the latest version, as the gateway doesn't have version compatibility as the recent updates make breaking changes.
The kong version we‘re using is 2.2.1. And I think the version of kong is compatible with the version of pdk because we have developed several plugins using go-pdk@v0.5.0. We have deployed many services and did secondary development based on the kong gateway 2.2.1, so we tend to use the current version of kong beacause the upgrade should be evaluate carefully... So is there any way to print out the log correctly in hybrid mode using the kong and go pdk we're currently using?Thank you so much!
I thought you were using the latest version of Kong and that is not compatible with go-pdk@v0.5.0. I will investigate your issue later.
I am using kong:3.0.0-alpine
and go-pdk@v0.8.0
, it is not working for these combinations as well. @StarlightIbuki Is there any guide docs regarding compatibility/version requirement? Thank you.
@Tolsee go-pdk@v0.8.0
works with kong 3.1.0.
@Tolsee
go-pdk@v0.8.0
works with kong 3.1.0.
For me this isn't working as well. I also tried with kong 3.1.1 and that also doesn't work.
@Tolsee
go-pdk@v0.8.0
works with kong 3.1.0.For me this isn't working as well. I also tried with kong 3.1.1 and that also doesn't work.
Could you provide more detailed information? For example the log, the stdout print, etc.
@Tolsee
go-pdk@v0.8.0
works with kong 3.1.0.
This worked for me.
Closing as resolved - please reopen if the issue persists with the latest go-pdk (0.10.0) and newer Kong versions.
I wrote a plugin in golang,and print log like this:
this plugin imported
and add config :
then I installed this plugin on my service and and send requests, but no log is printed out in the log files as expected (i checked access.log, admin_access.log and error.log)
so how can I print out the log correctly?
Thankyou!