Skip to content

Commit 71aae42

Browse files
committed
fixup! Add a command audit log
1 parent ed3aeb8 commit 71aae42

File tree

1 file changed

+6
-2
lines changed
  • crates/core/tedge_agent/src/operation_workflows

1 file changed

+6
-2
lines changed

crates/core/tedge_agent/src/operation_workflows/actor.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ impl WorkflowActor {
164164
Ok(Some(new_state)) => {
165165
self.persist_command_board().await?;
166166
if new_state.is_init() {
167-
tracing::info!(target: "Audit", "Execute {operation} command");
167+
tracing::info!(target: "Audit", "Execute {operation} command, log = {}", log_file.path);
168168
self.process_command_update(new_state.with_log_path(&log_file.path))
169169
.await?;
170170
}
@@ -217,7 +217,11 @@ impl WorkflowActor {
217217

218218
match action {
219219
OperationAction::Clear => {
220-
tracing::info!(target: "Audit", "{} {operation} command", if state.is_successful() {"Executed"} else { "Failed"});
220+
tracing::info!(
221+
target: "Audit",
222+
"{} {operation} command",
223+
if state.is_successful() {"Executed"} else { "Failed"},
224+
);
221225
if let Some(invoking_command) =
222226
self.workflow_repository.invoking_command_state(&state)
223227
{

0 commit comments

Comments
 (0)