I’ve been implementing logging capabilities in Dash for the last weeks and mostly doing so base don my prior experience with the logging library of python. However, I have some questions regarding this being a case for a web app, since my past experience has been in embedded systems were the instances running is just one and there are no “client” and “server” side.
How to differentiate between clients in the logs? specifically the disk file logs. So far I havent been able to think of a good solution to it
Are there any good practices (Dash or Flask specific) in terms of log configuration?
I typically assign a session ID to each client. If you just need to distinguish between client in terms of uniqueness, you could log the session ID. Alternatively, you could log a user name or similar if available
Yes this is my approach as well, however the session id get assigned after I’ve configured my logger already and it is (the session_id) only inside the layout.
How do you suggest accessing the s-id? or how to post-session initialization configure the logger?
Ah I see, thanks Emil. I originally thought that dash-extensions was an optional install to Dash, rather than another project, and that replacing DashProxy with Dash would be equivalent. Makes a lot more sense now that I’ve looked through the dash-extensions docs!