Skip to content

Commit

Permalink
Use dedicated versioning for the log file
Browse files Browse the repository at this point in the history
  • Loading branch information
albinsuresh committed Dec 19, 2023
1 parent 4669a10 commit b4373da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/core/tedge_api/src/message_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use std::io::Write;
use std::path::Path;

const LOG_FILE_NAME: &str = "entity_store.jsonl";
const LOG_FORMAT_VERSION: &str = "1.0";

#[derive(thiserror::Error, Debug)]
pub enum LogEntryError {
Expand Down Expand Up @@ -83,8 +84,7 @@ impl MessageLogWriter {
let mut writer = BufWriter::new(file);

if file_is_empty {
let version = env!("CARGO_PKG_VERSION");
let version_info = json!({"version": version}).to_string();
let version_info = json!({"version": LOG_FORMAT_VERSION}).to_string();
writeln!(writer, "{}", version_info)?;
}

Expand Down

0 comments on commit b4373da

Please sign in to comment.