Skip to content

Commit

Permalink
Remove LOG_PREFIX
Browse files Browse the repository at this point in the history
  • Loading branch information
twitu committed Mar 14, 2024
1 parent 16c6450 commit ff68e4e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions fs-storage/src/file_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ use std::{

use data_error::{ArklibError, Result};

const LOG_PREFIX: &str = "[file-storage]";
const STORAGE_VERSION: i32 = 2;
const STORAGE_VERSION_PREFIX: &str = "version ";
const KEY_VALUE_SEPARATOR: char = ':';

pub struct FileStorage {
log_prefix: String,
label: String,
path: PathBuf,
timestamp: SystemTime,
Expand All @@ -28,7 +26,6 @@ impl FileStorage {
pub fn new(label: String, path: &Path) -> Self {
Self {
label: label.clone(),
log_prefix: format!("{} {}", LOG_PREFIX, label).to_string(),
path: PathBuf::from(path),
timestamp: SystemTime::now(),
}
Expand Down Expand Up @@ -143,7 +140,7 @@ impl FileStorage {

log::info!(
"{} {} entries has been written",
self.log_prefix,
self.label,
value_by_id.len()
);
Ok(())
Expand All @@ -153,7 +150,7 @@ impl FileStorage {
if let Err(e) = fs::remove_file(&self.path) {
log::error!(
"{} Failed to delete file because of error: {}",
self.log_prefix,
self.label,
e
)
}
Expand Down

0 comments on commit ff68e4e

Please sign in to comment.