mirror of
https://github.com/tw93/Mole.git
synced 2026-02-14 14:07:30 +00:00
feat: log cleanup operations for troubleshooting
This commit is contained in:
@@ -42,6 +42,10 @@ note_activity() {
|
||||
|
||||
# Main purge function
|
||||
start_purge() {
|
||||
# Set current command for operation logging
|
||||
export MOLE_CURRENT_COMMAND="purge"
|
||||
log_operation_session_start "purge"
|
||||
|
||||
# Clear screen for better UX
|
||||
if [[ -t 1 ]]; then
|
||||
printf '\033[2J\033[H'
|
||||
@@ -214,6 +218,9 @@ perform_purge() {
|
||||
summary_details+=("Free space now: $(get_free_space)")
|
||||
fi
|
||||
|
||||
# Log session end
|
||||
log_operation_session_end "purge" "${total_items_cleaned:-0}" "${total_size_cleaned:-0}"
|
||||
|
||||
print_summary_block "$summary_heading" "${summary_details[@]}"
|
||||
printf '\n'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user