Skip to main content

Development

πŸ“œ Changing the log level

So, you have been asked to change the log level, probably to Submit the logs via the Bug reporter after.

See the current log level

To check the current log Settings navigate in Acter to Settings β†’ Info. Last in the Section Debug Info you will find the entry Rust Log Settings showing you the current value that is set there.

Updating the Log Settings

To change the log settings, click/tap that settings entry. A modal with a text field will open up, where you can change the value. Don’t forget to click β€œsave” once you changed it and restart the app after. Most likely you just want to copy-paste the specific log information the developer told you as the syntax is quite fickly and easy to make mistakes when typing.

πŸ’‘
The log setting is only applied when the App starts. Thus when changing the setting don’t forget to close and restart the App. The log that is written from that start forward will have the settings applied as you typed them in. Go trigger the bug again and then you submit the logs via the bug reporter.

Resetting the debug level

A more verbose log level is a potential privacy concern as it might reveal sensitive information in the logs. The logs are written to the file system in the application cache in clear text and cleared on every app start (same as any screenshots taken with the bug reporter), but it is generally recommended to keep them as small as possible to prevent potential safety problems.

You can easily reset the debug level by going to Settingsβ†’Info section, click on the Rust Log Settings and click the red Resetbutton. Don’t forget to close and restart the app again after.

Editing the log level value

If you are a developer you might want to edit that log level to include certain entries or exclude other. The log level string itself is a comma-separated list of entries, where each is of the format matchKey=tracelevel.

It is parsed in the given order and if the matchkey matches the current entry the given tracelevel is applied. That matchkey is startfirst match on the value, so everything within that realm apply. Usually modules in the matchkey are divided by :: so e.g. acter_core::executor only applies to the executor module in the acter_core.

If no matchkey= is given, the value is assumed to be a tracelevel to be applied to all that haven't matched yet. This is usually only useful at the end to have a generic fallback.

tracelevel can be any of error, warn, info, debug, trace where each level shows more detailed information and includes all the ones above. By default things are set to be on warn only.