Open klayyu opened 2 years ago
I found it will print a debug level log when start plugin with an unrecognized format, if i turn the log to above debug level (info eg.), this will successfully run over.
code here: https://github.com/hashicorp/go-plugin/blob/5a212b5b9ae4c3bed24ad357f98a8d1c9f23e8a4/server.go#L401
Hi, I hope this will be useful for some,
after digging into the problem myself in my project I reached to the following conclusions:
Start()
logic invoked from Client()
call (in order to connect to the client - on the host side)hence in my project I routed all my logs to the plugin logging mechanics and turned off all messages going to stdout before calling plugin.Serve()
(on the plugin side)
@gilwo is spot on - any logging from the plugin should be written to stderr, and then go-plugin will ship those logs into the client's logger output. Technically you could print to stdout after the connection has been successfully negotiated in Start()
(called from Client()
) but I'd recommend sticking to stderr which is where go-plugin expects any logs to be printed.
Hi,there, thank you for the great go-plugin, I am getting this error when using 3rd log package. client Error:Unrecognized remote plugin message...
how can i stop sync log info from plugin to host, or can i use 3rd log package?