Skip to content

Commit

Permalink
Do not log profile, if its release
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsnaps committed Aug 15, 2022
1 parent 2571fd0 commit d29e2fe
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions limitador-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,19 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}

fn create_config() -> (Configuration, String) {
let full_version = format!(
"{} build v{} ({})",
LIMITADOR_PROFILE,
LIMITADOR_VERSION,
env!("LIMITADOR_GIT_HASH")
);
let full_version = {
let build = match LIMITADOR_PROFILE {
"release" => "".to_owned(),
other => format!(" {} build", other),
};

format!(
"v{} ({}){}",
LIMITADOR_VERSION,
env!("LIMITADOR_GIT_HASH"),
build,
)
};

// figure defaults out
let default_limit_file = env::var("LIMITS_FILE").unwrap_or_else(|_| "".to_string());
Expand Down

0 comments on commit d29e2fe

Please sign in to comment.