Svecco commented on code in PR #2452:
URL: https://github.com/apache/iggy/pull/2452#discussion_r2636794895


##########
core/server/src/log/logger.rs:
##########
@@ -253,8 +255,48 @@ impl Logging {
             let base_directory = PathBuf::from(base_directory);
             let logs_subdirectory = PathBuf::from(config.path.clone());
             let logs_path = base_directory.join(logs_subdirectory.clone());
-            let file_appender =
-                tracing_appender::rolling::hourly(logs_path.clone(), 
IGGY_LOG_FILE_PREFIX);
+
+            if let Err(e) = std::fs::create_dir_all(&logs_path) {
+                tracing::warn!("Failed to create logs directory {:?}: {}", 
logs_path, e);
+                return Err(LogError::FileReloadFailure);
+            }
+
+            // Check available disk space (at least 10MB)
+            let min_disk_space: u64 = 10 * 1024 * 1024; // 10MB

Review Comment:
   Ok, now this parameter and the subsequent one with the same issue have both 
been declared as constants and placed at the beginning of the code.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to