File tree 2 files changed +48
-4
lines changed
2 files changed +48
-4
lines changed Original file line number Diff line number Diff line change 12
12
//! ```text
13
13
//! TORRUST_CHECKER_CONFIG=$(cat "./share/default/config/tracker_checker.json") cargo run --bin tracker_checker
14
14
//! ```
15
+ //!
16
+ //! Another real example to test the Torrust demo tracker:
17
+ //!
18
+ //! ```text
19
+ //! TORRUST_CHECKER_CONFIG='{
20
+ //! "udp_trackers": ["144.126.245.19:6969"],
21
+ //! "http_trackers": ["https://tracker.torrust-demo.com"],
22
+ //! "health_checks": ["https://tracker.torrust-demo.com/api/health_check"]
23
+ //! }' cargo run --bin tracker_checker
24
+ //! ```
25
+ //!
26
+ //! The output should be something like the following:
27
+ //!
28
+ //! ```json
29
+ //! {
30
+ //! "udp_trackers": [
31
+ //! {
32
+ //! "url": "144.126.245.19:6969",
33
+ //! "status": {
34
+ //! "code": "ok",
35
+ //! "message": ""
36
+ //! }
37
+ //! }
38
+ //! ],
39
+ //! "http_trackers": [
40
+ //! {
41
+ //! "url": "https://tracker.torrust-demo.com/",
42
+ //! "status": {
43
+ //! "code": "ok",
44
+ //! "message": ""
45
+ //! }
46
+ //! }
47
+ //! ],
48
+ //! "health_checks": [
49
+ //! {
50
+ //! "url": "https://tracker.torrust-demo.com/api/health_check",
51
+ //! "status": {
52
+ //! "code": "ok",
53
+ //! "message": ""
54
+ //! }
55
+ //! }
56
+ //! ]
57
+ //! }
58
+ //! ```
15
59
use std:: path:: PathBuf ;
16
60
use std:: sync:: Arc ;
17
61
18
62
use anyhow:: { Context , Result } ;
19
63
use clap:: Parser ;
20
- use tracing:: info ;
64
+ use tracing:: debug ;
21
65
use tracing:: level_filters:: LevelFilter ;
22
66
23
67
use super :: config:: Configuration ;
@@ -59,7 +103,7 @@ pub async fn run() -> Result<Vec<CheckResult>> {
59
103
60
104
fn tracing_stdout_init ( filter : LevelFilter ) {
61
105
tracing_subscriber:: fmt ( ) . with_max_level ( filter) . init ( ) ;
62
- info ! ( "logging initialized." ) ;
106
+ debug ! ( "logging initialized." ) ;
63
107
}
64
108
65
109
fn setup_config ( args : Args ) -> Result < Configuration > {
Original file line number Diff line number Diff line change @@ -63,8 +63,8 @@ use anyhow::Context;
63
63
use aquatic_udp_protocol:: { Port , Response , TransactionId } ;
64
64
use clap:: { Parser , Subcommand } ;
65
65
use torrust_tracker_primitives:: info_hash:: InfoHash as TorrustInfoHash ;
66
+ use tracing:: debug;
66
67
use tracing:: level_filters:: LevelFilter ;
67
- use tracing:: { debug, info} ;
68
68
use url:: Url ;
69
69
70
70
use crate :: console:: clients:: udp:: checker;
@@ -128,7 +128,7 @@ pub async fn run() -> anyhow::Result<()> {
128
128
129
129
fn tracing_stdout_init ( filter : LevelFilter ) {
130
130
tracing_subscriber:: fmt ( ) . with_max_level ( filter) . init ( ) ;
131
- info ! ( "logging initialized." ) ;
131
+ debug ! ( "logging initialized." ) ;
132
132
}
133
133
134
134
async fn handle_announce ( tracker_socket_addr : & SocketAddr , info_hash : & TorrustInfoHash ) -> anyhow:: Result < Response > {
You can’t perform that action at this time.
0 commit comments