Created
May 13, 2020 12:31
-
-
Save horvaro/d7ac225026bd0804bf15debcee0a5c71 to your computer and use it in GitHub Desktop.
Simple Bash Logger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#Usage: log "Hello World!" | |
LOG_FORMAT="%Y-%m-%d %H:%M:%S %Z" | |
log() { | |
echo -e "[$(date +"${LOG_FORMAT}")] $1"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment