Skip to content

Commit

Permalink
chore: stop cleaning logs
Browse files Browse the repository at this point in the history
  • Loading branch information
brianp committed Dec 20, 2024
1 parent a407802 commit 2304d07
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use hardware::hardware_status_monitor::HardwareStatusMonitor;
use log::trace;
use log::{debug, error, info, warn};
use p2pool::models::Connections;
use std::fs::{create_dir_all, remove_dir_all, remove_file, File};
use std::fs::{remove_dir_all, remove_file};
use tokio::sync::watch::{self};
use updates_manager::UpdatesManager;

Expand Down Expand Up @@ -712,14 +712,8 @@ fn main() {
// Remove this after it's been rolled out for a few versions
let log_path = app.path().app_log_dir().map_err(|e| e.to_string())?;
let logs_cleared_file = log_path.join("logs_cleared");
if !logs_cleared_file.exists() {
match remove_dir_all(&log_path) {
Ok(()) => {
create_dir_all(&log_path).map_err(|e| e.to_string())?;
File::create(&logs_cleared_file).map_err(|e| e.to_string())?;
},
Err(e) => warn!(target: LOG_TARGET, "Could not clear log folder: {}", e)
}
if logs_cleared_file.exists() {
remove_file(&logs_cleared_file).map_err(|e| e.to_string())?;
}

let contents = setup_logging(
Expand Down

0 comments on commit 2304d07

Please sign in to comment.