You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feat: Make log level configurable via LOG_LEVEL environment variable
- Modifies `matrix_bot.py` to read the `LOG_LEVEL` environment variable (defaulting to INFO) and set the Python logging level accordingly.
- Adds `LOG_LEVEL` to `.env.example`.
- Updates `README.md` to document the new `LOG_LEVEL` configuration option.
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,7 @@ ALLOWED_INVITER_USER_ID="@adminuser:matrix.org" # Full Matrix User ID of the per
45
45
-`ALLOWED_INVITER_USER_ID`: Crucial for security. This is the full Matrix ID of the user who has permission to invite the bot into rooms. The bot will ignore invites from anyone else.
46
46
-`MATRIX_BOT_ALTS_JSON_PATH` (Optional): Specifies a custom path to the `alts.json` file. If not set, the bot defaults to looking for `sample.config/alts.json` relative to the `matrix_bot.py` script (or `/app/sample.config/alts.json` inside Docker).
47
47
-`MATRIX_BOT_SERVICES_JSON_PATH` (Optional): Specifies a custom path to the `services.json` file. If not set, the bot defaults to looking for `sample.config/services.json` relative to the `matrix_bot.py` script (or `/app/sample.config/services.json` inside Docker).
48
+
-`LOG_LEVEL` (Optional): Sets the logging level for the bot. Valid values are `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`. Defaults to `INFO` if not set or if an invalid value is provided. For example, set `LOG_LEVEL="DEBUG"` for more verbose output.
48
49
49
50
The `alts.json` and `services.json` files define the link substitution rules. By default, the bot expects these to be in the `sample.config/` directory. You can customize their location using the environment variables above. Sample files are provided in `sample.config/`.
0 commit comments