1
0
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:
tw93
2026-01-26 15:22:07 +08:00
parent e0aba780c8
commit 8c4cd7f82e
7 changed files with 267 additions and 119 deletions

View File

@@ -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'
}