Skip to content

Instantly share code, notes, and snippets.

View rudolphjacksonm's full-sized avatar

Jack Morris rudolphjacksonm

View GitHub Profile
@goodmami
goodmami / logging.bash
Last active May 6, 2024 18:24
Basic logging commands for Linux shell scripts
#!/bin/bash
##
## Simple logging mechanism for Bash
##
## Author: Michael Wayne Goodman <goodman.m.w@gmail.com>
## Thanks: Jul for the idea to add a datestring. See:
## http://www.goodmami.org/2011/07/simple-logging-in-bash-scripts/#comment-5854
## Thanks: @gffhcks for noting that inf() and debug() should be swapped,
## and that critical() used $2 instead of $1