-
Notifications
You must be signed in to change notification settings - Fork 82
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
revert: removes date from & symlink to log files #394
revert: removes date from & symlink to log files #394
Conversation
57a04f1
to
ee51f47
Compare
) This commit reverts the changes introduce by PR lightningdevkit#116 which added the date to log files when the node is started & a symlink to track the latest log file. This reversal is necessary to simplify the work required to integrate with OS-level log tools.
ee51f47
to
24cf565
Compare
@@ -1231,6 +1231,8 @@ fn build_with_store_internal( | |||
}) | |||
} | |||
|
|||
/// Sets up the node logger, creating a new log file if it does not exist, or utilizing | |||
/// the existing log file. | |||
fn setup_logger(config: &Config) -> Result<Arc<FilesystemLogger>, BuildError> { | |||
let log_dir = match &config.log_dir_path { | |||
Some(log_dir) => String::from(log_dir), |
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.
Github won't comment on the line below this, but let's drop the {storage_path_dir}/logs
folder now that we'll only have one log file. Rather, let's just default to {storage_path_dir}/ldk_node.log
.
109ab9c
to
c030775
Compare
c030775
to
dc9f840
Compare
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.
Basically LGTM I think.
One question, up to to you.
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.
Basically LGTM
- In addition, update docs for `ArcedNodeBuilder::set_log_file_path`
Thank you for the updates, mind rebasing on |
fc4aeb9
to
1eedcce
Compare
1eedcce
to
f033ba2
Compare
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.
Thanks, LGTM.
There is one minor nit, but given that we'll do larger refactoring on this anyways, this can be addressed some other time.
fn setup_logger(config: &Config) -> Result<Arc<FilesystemLogger>, BuildError> { | ||
let log_dir = match &config.log_dir_path { | ||
let log_file_path = match &config.log_file_path { | ||
Some(log_dir) => String::from(log_dir), |
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.
nit: This variable names should be adjusted to reflect it's now a file path, not the dir path anymore.
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.
Apologies for this. I'll address in another PR.
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.
No worries at all, let's just include a fixup commit in whatever logging-related PR you open next!
What this PR does:
Reverts the changes introduce by #116 which added the dates to log files whenever the node is started & a symlink to track the latest log file. This reversal is necessary to simplify the work required to integrate with OS-level log tools.
Related Issue
logger
interface #309