Log

Generic console and logging helpers

Functions

log_echo_error(message)

Logs a red message to STDERR

source "log.sh"

log_echo_error "error text"

output log_echo_error log_echo_error

log_[info|success|warning|debug|error](message)

Logs a message with timestamp and colored log level

source "log.sh"

log_info "info message"
log_success "success message"
log_warning "warning message"
log_debug "debug message"
log_error "error message"

output log log

log_die(message)

Logs a fatal message with timestamp and exits with error code 1

source "log.sh"

log_die "fatal message"

output log_die log_die

log_divider_header(message)

Logs a visual divider for multiline command output

source "log.sh"

log_divider_header "directory content"
ls -lsa
log_divider_footer

output log_divider log_divider