-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
14 implement logger initialization logic #15
Conversation
3da5b70
to
246ea40
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |
835b80c
to
e1a600a
Compare
e1a600a
to
adf1f86
Compare
adf1f86
to
3411daa
Compare
Please, fix merge conflicts |
6271683
to
64263a2
Compare
backend/src/config.rs
Outdated
fn init_file_rotate(&self) -> Result<FileRotate<AppendTimestamp>, LoggerError> { | ||
let config = self.file.as_ref().ok_or(LoggerError::EmptyConfig)?; | ||
let log_file = config.log_file.as_ref().ok_or(LoggerError::NoFileName)?; | ||
log_file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary complication of code readability. The code would be much clearer in this form:
if log_file.as_os_str().is_empty() {
return Err(LoggerError::NoFileName);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Resolves #14
Merging #9 will make this PR easier to review