posit-dev / positron

Positron, a next-generation data science IDE
Other
2.39k stars 70 forks source link

User logs are not sent to the console #4182

Open seeM opened 1 month ago

seeM commented 1 month ago

Originally posted by @ChadGoymer in https://github.com/posit-dev/positron/discussions/4169

Is anyone having trouble displaying Python logging in the console? The code below should print messages (for warnings and above as that is the default level for the logging module). However, I do not see any output:

image

Contrast this with the same code, run on the same Python interpreter, in VS Code:

image

Is there something I am missing in Positron?

Originally posted by @ChadGoymer in https://github.com/posit-dev/positron/discussions/4169

seeM commented 1 month ago

We'll need to figure out how to configure logging so that Positron logs are separate to user logs, and so that logging behaves like the IPython or Python REPLs by default.

Since IPython already seems to handle this fine, and our kernel, shell, etc, are subclasses, we should be able to learn from how they're handling it.