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

Logs from plugins are always shown as debug logs #3188

Closed
kichristensen opened this issue Jul 13, 2024 · 0 comments · Fixed by #3185
Closed

Logs from plugins are always shown as debug logs #3188

kichristensen opened this issue Jul 13, 2024 · 0 comments · Fixed by #3185
Assignees
Labels
bug Oops, sorry!

Comments

@kichristensen
Copy link
Contributor

Describe the bug

Logs from plugins are always shown as debug logs, even if it is info, warning or error logs.

To Reproduce

Steps to reproduce the behavior:

  1. Ensure that Docker is not running
  2. Run porter list
  3. See that the logs output doesn't contain the error log message, "Docker is not available", written by the by the plugin. Only the RPC error is returned.
  4. Run PORTER_LOGS_STRUCTURED=true porter list --verbosity debug
  5. See that the logs output does contain the error log message, "Docker is not available", written by the by the plugin. But it is written with the debug log level.

Expected behavior

Information, warning and error logs from plugins should be written with the correct log level.

Porter Command and Output

PORTER_LOGS_STRUCTURED=true porter list
2024-07-13T23:00:18.371+0200    error   rpc error: code = Unknown desc = Docker is not available
2024-07-13T23:00:18.371+0200    error   could not list installations: could not read storage schema document: rpc error: code = Unknown desc = Docker is not available
2024-07-13T23:00:18.371+0200    error   could not list installations: could not read storage schema document: rpc error: code = Unknown desc = Docker is not available
PORTER_LOGS_STRUCTURED=true porter list --verbosity debug
2024-07-13T22:57:36.433+0200    debug   Checking database schema
2024-07-13T22:57:36.433+0200    debug   Selected configured plugin      {"plugin-key": "mongodb-docker"}
2024-07-13T22:57:36.434+0200    debug   Connecting to plugin    {"plugin-command": "/home/kim/.porter/porter plugin run storage.porter.mongodb-docker"}
2024-07-13T22:57:36.434+0200    debug   starting plugin
2024-07-13T22:57:36.434+0200    debug   plugin started
2024-07-13T22:57:36.434+0200    debug   waiting for RPC address
2024-07-13T22:57:36.451+0200    debug   using plugin
2024-07-13T22:57:36.452+0200    debug   plugin address
2024-07-13T22:57:36.485+0200    debug   Docker is not available
2024-07-13T22:57:36.485+0200    debug   Docker is not available
2024-07-13T22:57:36.485+0200    error   rpc error: code = Unknown desc = Docker is not available
2024-07-13T22:57:36.485+0200    error   could not list installations: could not read storage schema document: rpc error: code = Unknown desc = Docker is not available
2024-07-13T22:57:36.485+0200    error   could not list installations: could not read storage schema document: rpc error: code = Unknown desc = Docker is not available
2024-07-13T22:57:36.486+0200    debug   received EOF, stopping recv loop
2024-07-13T22:57:36.487+0200    debug   plugin process exited
2024-07-13T22:57:36.487+0200    debug   plugin exited

Version

porter v1.1.0 (b50c189)

@kichristensen kichristensen added the bug Oops, sorry! label Jul 13, 2024
@kichristensen kichristensen self-assigned this Jul 13, 2024
@kichristensen kichristensen linked a pull request Jul 13, 2024 that will close this issue
4 tasks
@github-project-automation github-project-automation bot moved this from In Progress to Done in Porter v1.2.0 (November 2024) Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Oops, sorry!
Projects
Development

Successfully merging a pull request may close this issue.

1 participant