anvil-works / anvil-runtime

The runtime engine for hosting Anvil web apps
https://anvil.works/open-source
Other
904 stars 117 forks source link

Output of print() not visible #68

Closed haimat closed 10 months ago

haimat commented 1 year ago

When I run our anvil app locally via the anvil-runtime, then I don't see the output of the print() statements in the server code. Is this a bug or intended behaviour? If the latter, how is one supposed to log messages with the local Anvil server?

jpvrenen commented 1 year ago

When I use print() in my client/server code it works. Dec 19 08:08:41 python3[627138]: [DEBUG anvil.app-server.run] [SERVER] marker: from server code Dec 19 08:08:37 python3[627138]: [DEBUG anvil.app-server.run] [CLIENT] marker: from client code

haimat commented 1 year ago

@jpvrenen Thanks, but I cannot see the server messages. Maybe I am doing something wrong. From which function in the server code have you called print()?

jpvrenen commented 1 year ago

@haimat it doesn't really matter either callable or not callable from client functions. Perhaps some weird permission thing? Are you running from a python environment?

How I start the server: /home/some user/py environment/bin/python3 /home/some user/py environment/bin/anvil-app-server --auto-migrate --config-file /config file location/config