Skip to content

Instantly share code, notes, and snippets.

@qsLI
Created June 14, 2019 09:35
Show Gist options
  • Save qsLI/16200a4628f70e01f48c9b3c618282e9 to your computer and use it in GitHub Desktop.
Save qsLI/16200a4628f70e01f48c9b3c618282e9 to your computer and use it in GitHub Desktop.
#bash #log
#!/bin/bash
readonly SCRIPT_NAME=$(basename $0)
log() {
logger -p user.notice -t $SCRIPT_NAME "$@"
}
err() {
logger -p user.error -t $SCRIPT_NAME "$@"
}
log "wgggggriting to stdout"
err "writinigggg:wqg to stderr"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment