diff --git a/config.sample.json b/config.sample.json index acd0b9f102..ef40014e0d 100644 --- a/config.sample.json +++ b/config.sample.json @@ -14,5 +14,6 @@ "platform": "platform", "default_max_upload_avatar_size_in_bytes": 1000000, "dev_mode": false, - "qr_code_download_url": "https://sign-up.twake.app/download/chat" + "qr_code_download_url": "https://sign-up.twake.app/download/chat", + "enable_logs": false } diff --git a/docs/configurations/config_web_app_for_public_platform.md b/docs/configurations/config_web_app_for_public_platform.md index 024332e6c7..8c1dbb6e1a 100644 --- a/docs/configurations/config_web_app_for_public_platform.md +++ b/docs/configurations/config_web_app_for_public_platform.md @@ -29,7 +29,8 @@ in [config.sample.json](https://github.com/linagora/twake-on-matrix/blob/main/co "platform": "platform" "default_max_upload_avatar_size_in_bytes": 1000000, "dev_mode": false, - "qr_code_download_url": "https://example.com/" + "qr_code_download_url": "https://example.com/", + "enable_logs": true } ``` @@ -49,5 +50,6 @@ in [config.sample.json](https://github.com/linagora/twake-on-matrix/blob/main/co - `default_max_upload_avatar_size_in_bytes`: Default max upload avatar size - `dev_mode`: Enable to run app in IDE, - `qr_code_download_url`: URL generate QR code to download app +- `enable_logs`: Enable logs If you want to disable it, please change the value or remove this from `config.sample.json` \ No newline at end of file diff --git a/lib/config/app_config.dart b/lib/config/app_config.dart index 1d6de1cde6..69a917b326 100644 --- a/lib/config/app_config.dart +++ b/lib/config/app_config.dart @@ -261,5 +261,8 @@ abstract class AppConfig { if (json['qr_code_download_url'] is String) { qrCodeDownloadUrl = json['qr_code_download_url']; } + if (json['enable_logs'] is bool) { + DebugUtils.enableLogs = json['enable_logs']; + } } } diff --git a/pubspec.lock b/pubspec.lock index b1e90b07ae..13640d3026 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1894,7 +1894,7 @@ packages: description: path: "." ref: main - resolved-ref: a498051a8a7e41a35bde65f37c25add3f808b929 + resolved-ref: "9353b6d6b6c1b9cc9e9a9290ffd0c777c6a0b479" url: "https://github.com/linagora/dart_matrix_api_lite.git" source: git version: "1.7.4"