Skip to content

Commit 46c3263

Browse files
committed
feat: normalize log nessages
- No '.' full stop at the end. - Start message wirh uppercase.
1 parent e299792 commit 46c3263

8 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/bootstrap/logging.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ fn tracing_stdout_init(filter: LevelFilter, style: &TraceStyle) {
5252
TraceStyle::Json => builder.json().init(),
5353
};
5454

55-
info!("logging initialized.");
55+
info!("Logging initialized");
5656
}
5757

5858
#[derive(Debug)]

src/console/ci/e2e/logs_parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl RunningServices {
2323
///
2424
/// ```text
2525
/// Loading configuration from default configuration file: `./share/default/config/tracker.development.sqlite3.toml` ...
26-
/// 2024-06-10T16:07:39.989540Z INFO torrust_tracker::bootstrap::logging: logging initialized.
26+
/// 2024-06-10T16:07:39.989540Z INFO torrust_tracker::bootstrap::logging: Logging initialized
2727
/// 2024-06-10T16:07:39.990205Z INFO UDP TRACKER: Starting on: udp://0.0.0.0:6868
2828
/// 2024-06-10T16:07:39.990215Z INFO UDP TRACKER: Started on: udp://0.0.0.0:6868
2929
/// 2024-06-10T16:07:39.990244Z INFO UDP TRACKER: Starting on: udp://0.0.0.0:6969
@@ -116,7 +116,7 @@ mod tests {
116116
fn it_should_parse_from_logs_with_valid_logs() {
117117
let logs = r"
118118
Loading configuration from default configuration file: `./share/default/config/tracker.development.sqlite3.toml` ...
119-
2024-06-10T16:07:39.989540Z INFO torrust_tracker::bootstrap::logging: logging initialized.
119+
2024-06-10T16:07:39.989540Z INFO torrust_tracker::bootstrap::logging: Logging initialized
120120
2024-06-10T16:07:39.990244Z INFO UDP TRACKER: Starting on: udp://0.0.0.0:6969
121121
2024-06-10T16:07:39.990255Z INFO UDP TRACKER: Started on: udp://0.0.0.0:6969
122122
2024-06-10T16:07:39.990261Z INFO torrust_tracker::bootstrap::jobs: TLS not enabled

src/console/ci/e2e/runner.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ pub fn run() -> anyhow::Result<()> {
117117

118118
fn tracing_stdout_init(filter: LevelFilter) {
119119
tracing_subscriber::fmt().with_max_level(filter).init();
120-
info!("Logging initialized.");
120+
info!("Logging initialized");
121121
}
122122

123123
fn load_tracker_configuration(args: &Args) -> anyhow::Result<String> {

src/console/clients/checker/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub async fn run() -> Result<Vec<CheckResult>> {
103103

104104
fn tracing_stdout_init(filter: LevelFilter) {
105105
tracing_subscriber::fmt().with_max_level(filter).init();
106-
debug!("logging initialized.");
106+
debug!("Logging initialized");
107107
}
108108

109109
fn setup_config(args: Args) -> Result<Configuration> {

src/console/clients/udp/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pub async fn run() -> anyhow::Result<()> {
129129

130130
fn tracing_stdout_init(filter: LevelFilter) {
131131
tracing_subscriber::fmt().with_max_level(filter).init();
132-
debug!("logging initialized.");
132+
debug!("Logging initialized");
133133
}
134134

135135
async fn handle_announce(remote_addr: SocketAddr, info_hash: &TorrustInfoHash) -> Result<Response, Error> {

src/console/profiling.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ pub async fn run() {
192192
info!("Torrust timed shutdown..");
193193
},
194194
_ = tokio::signal::ctrl_c() => {
195-
info!("Torrust shutting down via Ctrl+C..");
195+
info!("Torrust shutting down via Ctrl+C ...");
196196
// Await for all jobs to shutdown
197197
futures::future::join_all(jobs).await;
198198
}

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ async fn main() {
1010
// handle the signals
1111
tokio::select! {
1212
_ = tokio::signal::ctrl_c() => {
13-
info!("Torrust shutting down..");
13+
info!("Torrust shutting down ...");
1414

1515
// Await for all jobs to shutdown
1616
futures::future::join_all(jobs).await;

src/servers/apis/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
//!
4343
//! ```text
4444
//! Loading configuration from config file ./tracker.toml
45-
//! 023-03-28T12:19:24.963054069+01:00 [torrust_tracker::bootstrap::logging][INFO] logging initialized.
45+
//! 023-03-28T12:19:24.963054069+01:00 [torrust_tracker::bootstrap::logging][INFO] Logging initialized
4646
//! ...
4747
//! 023-03-28T12:19:24.964138723+01:00 [torrust_tracker::bootstrap::jobs::tracker_apis][INFO] Starting Torrust APIs server on: http://0.0.0.0:1212
4848
//! ```

0 commit comments

Comments
 (0)