Skip to content

Commit

Permalink
initialize the logger before writing the pid file
Browse files Browse the repository at this point in the history
  • Loading branch information
Keksoj authored and Geal committed Jul 30, 2021
1 parent 06a8e4b commit 8a530c2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ fn main() {
if upgrade == None {
let start = get_config_file_path(&matches)
.and_then(|config_file| load_configuration(config_file))
.and_then(|config| {
util::write_pid_file(&config)
.map(|()| config)
.map_err(|err| StartupError::PIDFileNotWritable(err))
})
.map(|config| {
util::setup_logging(&config);
info!("Starting up");
util::setup_metrics(&config);

config
})
.and_then(|config| {
util::write_pid_file(&config)
.map(|()| config)
.map_err(|err| StartupError::PIDFileNotWritable(err))
})
.and_then(|config| update_process_limits(&config).map(|()| config))
.and_then(|config| init_workers(&config).map(|workers| (config, workers)))
.map(|(config, workers)| {
Expand Down

0 comments on commit 8a530c2

Please sign in to comment.