App Logs visibility

Some have suggested that log entries be written in JSON format. That way, you can leverage Python’s JSON support to easily get it back as a Python dict. That is, the parts of the log entry are handily available by name.

With Anvil, it can be even easier. If the app_tables.logs table has a column of type SimpleObject, then Anvil will take care of converting between JSON (database) and dict (Python) formats for you. As far as your code is concerned, you are storing and retrieving log entries simply as dict values.

1 Like