mirror of
https://github.com/acedanger/shell.git
synced 2025-12-06 00:00:13 -08:00
clean up log files with ANSI color codes
This commit is contained in:
@@ -29,7 +29,7 @@ log_message() {
|
||||
local message="$1"
|
||||
local log_file="$LOG_DIR/crontab-management.log"
|
||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') $message"
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') $message" | sed 's/\x1b\[[0-9;]*m//g' >> "$log_file"
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') $message" | sed 's/\\033\[[0-9;]*m//g' >> "$log_file"
|
||||
}
|
||||
|
||||
log_error() {
|
||||
|
||||
Reference in New Issue
Block a user