Created
October 12, 2019 06:36
-
-
Save akskap/d70d3bbc7f89f702fc57b0e7e99f3815 to your computer and use it in GitHub Desktop.
Logger Functions in bash
This file contains hidden or 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 | |
function __msg_error() { | |
[[ "${ERROR}" == "1" ]] && echo -e "[ERROR]: $*" | |
} | |
function __msg_debug() { | |
[[ "${DEBUG}" == "1" ]] && echo -e "[DEBUG]: $*" | |
} | |
function __msg_info() { | |
[[ "${INFO}" == "1" ]] && echo -e "[INFO]: $*" | |
} | |
__msg_error "File could not be found. Cannot proceed" | |
__msg_debug "Starting script execution with 276MB of available RAM" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment