@@ -29,8 +29,12 @@ const DEFAULT_LDK_WALLET_SYNC_INTERVAL_SECS: u64 = 30;
2929const DEFAULT_FEE_RATE_CACHE_UPDATE_INTERVAL_SECS : u64 = 60 * 10 ;
3030const DEFAULT_PROBING_LIQUIDITY_LIMIT_MULTIPLIER : u64 = 3 ;
3131const DEFAULT_ANCHOR_PER_CHANNEL_RESERVE_SATS : u64 = 25_000 ;
32- const DEFAULT_LOG_FILE_PATH : & ' static str = "ldk_node.log" ;
33- const DEFAULT_LOG_LEVEL : LogLevel = LogLevel :: Debug ;
32+
33+ /// The default log level.
34+ pub const DEFAULT_LOG_LEVEL : LogLevel = LogLevel :: Debug ;
35+
36+ /// The default log file path.
37+ pub const DEFAULT_LOG_FILE_PATH : & ' static str = "/tmp/ldk_node/ldk_node.log" ;
3438
3539// The 'stop gap' parameter used by BDK's wallet sync. This seems to configure the threshold
3640// number of derivation indexes after which BDK stops looking for new scripts belonging to the wallet.
@@ -436,8 +440,7 @@ pub struct FilesystemLoggerConfig {
436440 ///
437441 /// This specifies the log file path if a destination other than the storage
438442 /// directory, i.e. [`Config::storage_dir_path`], is preferred. If unconfigured,
439- /// defaults to [`DEFAULT_STORAGE_DIR_PATH`]/[`DEFAULT_LOG_FILE_PATH`], i.e.
440- /// `/tmp/ldk_node/ldk_node.log`
443+ /// defaults to [`DEFAULT_LOG_FILE_PATH`]
441444 pub log_file_path : Option < String > ,
442445 /// This specifies the log level.
443446 ///
@@ -447,19 +450,13 @@ pub struct FilesystemLoggerConfig {
447450
448451impl Default for FilesystemLoggerConfig {
449452 fn default ( ) -> Self {
450- let log_file_path = default_log_file_path ( ) ;
451- Self { log_file_path : Some ( log_file_path) , log_level : Some ( default_log_level ( ) ) }
453+ Self {
454+ log_file_path : Some ( DEFAULT_LOG_FILE_PATH . to_string ( ) ) ,
455+ log_level : Some ( DEFAULT_LOG_LEVEL ) ,
456+ }
452457 }
453458}
454459
455- pub ( crate ) fn default_log_file_path ( ) -> String {
456- format ! ( "{}/{}" , DEFAULT_STORAGE_DIR_PATH , DEFAULT_LOG_FILE_PATH )
457- }
458-
459- pub ( crate ) fn default_log_level ( ) -> LogLevel {
460- DEFAULT_LOG_LEVEL
461- }
462-
463460#[ cfg( test) ]
464461mod tests {
465462 use std:: str:: FromStr ;
0 commit comments