Skip to content

Instantly share code, notes, and snippets.

@voidcoefficient
Created March 30, 2026 09:16
Show Gist options
  • Select an option

  • Save voidcoefficient/036cb3ca4ebcca92aaa6269fad62e418 to your computer and use it in GitHub Desktop.

Select an option

Save voidcoefficient/036cb3ca4ebcca92aaa6269fad62e418 to your computer and use it in GitHub Desktop.
the bash logger
# @describe the bash logger
#
# AUTHOR: Marla Albuquerque <marla@albuque.com>
#
# @meta required-tools gum,argc
# @meta version beta
log_structure="layout"
set -e
# @cmd
# @arg message~
error() {
gum log -s -t "$log_structure" -l error "$argc_message"
}
# @cmd
# @arg message~
debug() {
gum log -s -t "$log_structure" -l debug "$argc_message"
}
# @cmd
# @arg message~
info() {
gum log -s -t "$log_structure" -l info "$argc_message"
}
# @cmd
# @arg message~
warn() {
gum log -s -t "$log_structure" -l warn "$argc_message"
}
eval "$(argc --argc-eval "$0" "$@")"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment