Skip to content

Commit

Permalink
feat: the configuration can be serialized as JSON
Browse files Browse the repository at this point in the history
We will print to logs the final configuration used to run the tracker (after Figment processes
all sources):

```output
Loading extra configuration from file: `storage/tracker/etc/tracker.toml` ...
2024-07-01T15:29:09.785334Z  INFO torrust_tracker::bootstrap::logging: Logging initialized
2024-07-01T15:29:09.785862Z  INFO torrust_tracker::bootstrap::app: Configuration:
 {
  "logging": {
    "log_level": "info"
  },
  "core": {
    "announce_policy": {
      "interval": 120,
      "interval_min": 120
    },
    "database": {
      "driver": "Sqlite3",
      "path": "./storage/tracker/lib/database/sqlite3.db"
    },
    "inactive_peer_cleanup_interval": 600,
    "listed": false,
    "net": {
      "external_ip": "0.0.0.0",
      "on_reverse_proxy": false
    },
    "private": true,
    "tracker_policy": {
      "max_peer_timeout": 900,
      "persistent_torrent_completed_stat": false,
      "remove_peerless_torrents": true
    },
    "tracker_usage_statistics": true
  },
  "udp_trackers": null,
  "http_trackers": null,
  "http_api": null,
  "health_check_api": {
    "bind_address": "127.0.0.1:1313"
  }
}
2024-07-01T15:29:09.785879Z  WARN torrust_tracker::app: No services enabled in configuration
2024-07-01T15:29:09.785920Z  INFO torrust_tracker::app: No UDP blocks in configuration
2024-07-01T15:29:09.785923Z  INFO torrust_tracker::app: No HTTP blocks in configuration
2024-07-01T15:29:09.785924Z  INFO torrust_tracker::app: No API block in configuration
2024-07-01T15:29:09.785941Z  INFO HEALTH CHECK API: Starting on: http://127.0.0.1:1313
2024-07-01T15:29:09.786035Z  INFO HEALTH CHECK API: Started on: http://127.0.0.1:1313
```
  • Loading branch information
josecelano committed Jul 1, 2024
1 parent 46c3263 commit ddfbde3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/configuration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ camino = { version = "1.1.6", features = ["serde", "serde1"] }
derive_more = "0"
figment = { version = "0.10.18", features = ["env", "test", "toml"] }
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
serde_with = "3"
thiserror = "1"
toml = "0"
Expand Down

0 comments on commit ddfbde3

Please sign in to comment.