canvas-medical / canvas-plugins

1 stars 0 forks source link

Cannot log messages to inspect data structures #112

Open andhines opened 1 week ago

andhines commented 1 week ago

I had assumed my print statements would appear in the logs, but they don't. I just see this kind of high level stuff:

image

I searched the docs and don't see a different way to log messages.

The reason I want to log messages is to understand what results looks like in my prescibe search annotation plugin (modeled after this guide). There should be a way for me to understand the structure of results without deploying and logging. But apparently that is not an option either??

Here's what I'm trying to log with print function calls:

image
aduane commented 1 week ago

Definitely a documentation oversight. Here's what the docs will tell you once we add them:

print won't show up in the log stream, instead use:

from logger import log

log.info("string you want to log")
log.warn("string you want to warn about")
log.error("string that represents an error")
andhines commented 1 week ago

I'm glad to see at least I just didn't fail to discover the correct approach. I'll look out for when this issue gets closed 👍