Improve logging
This commit is contained in:
parent
4456767ec4
commit
84f077f36b
16 changed files with 90 additions and 34 deletions
|
|
@ -24,7 +24,7 @@ impl Default for LoggingConfig {
|
|||
}
|
||||
|
||||
fn default_log_directory() -> String {
|
||||
debug!("Using default log directory: {DEFAULT_LOG_DIRECTORY}");
|
||||
debug!("Using default log directory: `{DEFAULT_LOG_DIRECTORY}`");
|
||||
DEFAULT_LOG_DIRECTORY.to_owned()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ fn default_port() -> u16 {
|
|||
}
|
||||
|
||||
fn default_max_body_size_mb() -> usize {
|
||||
debug!("Using default max body size (MB): {DEFAULT_MAX_BODY_SIZE_MB}");
|
||||
debug!("Using default max body size {DEFAULT_MAX_BODY_SIZE_MB} MB");
|
||||
DEFAULT_MAX_BODY_SIZE_MB
|
||||
}
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ fn default_max_clients_per_vault() -> usize {
|
|||
}
|
||||
|
||||
fn default_response_timeout_seconds() -> u64 {
|
||||
debug!("Using default response timeout (seconds): {DEFAULT_RESPONSE_TIMEOUT_SECONDS}");
|
||||
debug!("Using default response timeout: {DEFAULT_RESPONSE_TIMEOUT_SECONDS} seconds");
|
||||
DEFAULT_RESPONSE_TIMEOUT_SECONDS
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ where
|
|||
for user in &users {
|
||||
if let Some(existing_name) = user_token_map.get_by_right(&user.token) {
|
||||
return Err(D::Error::custom(format!(
|
||||
"Duplicate user token found: '{}' for users '{}' and '{}'. User tokens must be \
|
||||
"Duplicate user token found: `{}` for users `{}` and `{}`. User tokens must be \
|
||||
unique.",
|
||||
user.token, existing_name, user.name
|
||||
)));
|
||||
|
|
@ -28,7 +28,7 @@ where
|
|||
|
||||
if user_token_map.contains_left(&user.name) {
|
||||
return Err(D::Error::custom(format!(
|
||||
"Duplicate user name found: '{}'. User names must be unique.",
|
||||
"Duplicate user name found: `{}`. User names must be unique.",
|
||||
user.name
|
||||
)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue