Skip to content

Commit 5fd0c84

Browse files
committed
chore: normalize log ouput
Added targets to all services especially when they start: [HTTP Tracker], [UDP Tracker], etc. ``` Loading default configuration file: `./share/default/config/tracker.development.sqlite3.toml` ... 2024-01-11T17:12:11.134816964+00:00 [torrust_tracker::bootstrap::logging][INFO] logging initialized. 2024-01-11T17:12:11.135473883+00:00 [UDP Tracker][INFO] Starting on: udp://0.0.0.0:6969 2024-01-11T17:12:11.135494422+00:00 [UDP Tracker][INFO] Started on: udp://0.0.0.0:6969 2024-01-11T17:12:11.135503672+00:00 [torrust_tracker::bootstrap::jobs][INFO] TLS not enabled 2024-01-11T17:12:11.135587738+00:00 [HTTP Tracker][INFO] Starting on: http://0.0.0.0:7070 2024-01-11T17:12:11.135612497+00:00 [HTTP Tracker][INFO] Started on: http://0.0.0.0:7070 2024-01-11T17:12:11.135619586+00:00 [torrust_tracker::bootstrap::jobs][INFO] TLS not enabled 2024-01-11T17:12:11.135675454+00:00 [API][INFO] Starting on http://127.0.0.1:1212 2024-01-11T17:12:11.135688443+00:00 [API][INFO] Started on http://127.0.0.1:1212 2024-01-11T17:12:11.135701143+00:00 [Health Check API][INFO] Starting on: http://127.0.0.1:1313 2024-01-11T17:12:11.135718012+00:00 [Health Check API][INFO] Started on: http://127.0.0.1:1313 ```
1 parent 0c1f389 commit 5fd0c84

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/bootstrap/jobs/health_check_api.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,18 @@ pub async fn start_job(config: Arc<Configuration>) -> JoinHandle<()> {
4444

4545
// Run the API server
4646
let join_handle = tokio::spawn(async move {
47-
info!("Starting Health Check API server: http://{}", bind_addr);
47+
info!(target: "Health Check API", "Starting on: http://{}", bind_addr);
4848

4949
let handle = server::start(bind_addr, tx_start, config.clone());
5050

5151
if let Ok(()) = handle.await {
52-
info!("Health Check API server on http://{} stopped", bind_addr);
52+
info!(target: "Health Check API", "Stopped server running on: http://{}", bind_addr);
5353
}
5454
});
5555

5656
// Wait until the API server job is running
5757
match rx_start.await {
58-
Ok(msg) => info!("Torrust Health Check API server started on: http://{}", msg.address),
58+
Ok(msg) => info!(target: "Health Check API", "Started on: http://{}", msg.address),
5959
Err(e) => panic!("the Health Check API server was dropped: {e}"),
6060
}
6161

0 commit comments

Comments
 (0)