Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launched plugins Stdout/Stderr are dropped #65

Open
champtar opened this issue Jan 25, 2024 · 4 comments
Open

Launched plugins Stdout/Stderr are dropped #65

champtar opened this issue Jan 25, 2024 · 4 comments

Comments

@champtar
Copy link
Contributor

cmd := exec.Command(filepath.Join(dir, name))

cmd.Stdout/Stderr are nil, so everything goes to /dev/null

@klihub
Copy link
Member

klihub commented Feb 29, 2024

cmd := exec.Command(filepath.Join(dir, name))

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.

@champtar
Copy link
Contributor Author

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)

@champtar
Copy link
Contributor Author

Or you mean redirecting stdout / stderr to syslog in plugin.go and not in each plugins ?

@klihub
Copy link
Member

klihub commented Mar 1, 2024

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants