nri
nri copied to clipboard
Launched plugins Stdout/Stderr are dropped
https://github.com/containerd/nri/blob/6f5a4d2f231d1032682d2809f95a1815a08f8532/pkg/adaptation/plugin.go#L119 cmd.Stdout/Stderr are nil, so everything goes to /dev/null
https://github.com/containerd/nri/blob/6f5a4d2f231d1032682d2809f95a1815a08f8532/pkg/adaptation/plugin.go#L119
cmd.Stdout/Stderr are nil, so everything goes to /dev/null
This was a conscious choice to avoid, for instance, proxying log messages through the runtime. The idea was that the plugins will set up and take care of their own logging using syslog(3).
We can update the stub so that it automatically sets up logging via syslog, when the plugin is launched by the runtime.
The big limitation of using syslog is that panic text is not logged, or at least need some more work (in 1.23 we will have SetCrashOutput)
Or you mean redirecting stdout / stderr to syslog in plugin.go and not in each plugins ?
Or you mean redirecting stdout / stderr to syslog in plugin.go and not in each plugins ?
No, I mean in the pkg/stub, which is then on the plugin side...