Skip to content

Commit 9e986ce

Browse files
committed
fix: Remove unnecessary non-PID 1 log output
Removed an `eprintln!` statement that logged when the process was not running as PID 1. Observing the recent health-check logs, I find this redundant, un-necessary and in some cases confusing. The whole purpose of these logs is to ensure that the Devops engineer is able to confirm that the application is being run as PID 1 and something else is not configured as entry point in the docker container. We already provide logs when it is currently run as PID 1. Right now, when we relaunch the process - it's is launched as a child process and they log these extra message (pid1-rs: Process not running as Pid 1) which makes all the logs confusing since we see series of this message.
1 parent 92c4f64 commit 9e986ce

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,5 @@ Options:
8484

8585
## Development
8686

87-
The testing steps are documented in [Development.md](./Development.md). We have also
87+
The testing steps are documented in [Development.md](./Development.md). We also have
8888
integration tests for the same.

pid1/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,6 @@ impl Pid1Settings {
100100
}
101101
pid1_handling(self, signals, child)
102102
} else {
103-
if self.log {
104-
eprintln!("pid1-rs: Process not running as Pid 1: PID {pid}");
105-
}
106103
Ok(())
107104
}
108105
}

pid1/tests/sanity.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ fn sanity_test() {
5151
stdout.contains(&"pid1-rs: Process running as PID 1"),
5252
"One process runs as pid1",
5353
);
54-
assert!(
55-
stdout.contains(&"pid1-rs: Process not running as Pid 1"),
56-
"Child process not running as pid1",
57-
);
5854
}
5955

6056
#[test]

0 commit comments

Comments
 (0)