Anvil Community Forum

[DONE] Session ID

Is there a session ID set anywhere?
If I print(anvil.server.session) I just get “Session:{}”

Can obviously create my own using uuid.

Nothing publicly accessible at the moment. Making your own works :slight_smile:

1 Like

Is this still true - that session IDs (i.e. the 8 character identifier in App Logs) are unavailable in client and/or server code?

Yep, still the case! Can you share your use case?

I keep detailed logs in a data table on most user activity. I’d like to associate events in that log with a session id so I could relate those logs to those generated using the print(msg) method.


Good use case! I’m moving this to Feature Requests :+1:


Any update on this? I too would like to have a way to quickly search my logs for issues my users have.


Is there any update on this one by any chance?

You can use anvil.server.session.session_id to get the session id, and you can search the app logs by the session id to see the output for that session.


Great! Thanks @jshaffstall

In case someone else stumbles: This appears only available server-side.

1 Like