Add user specified logfile

This commit is contained in:
Nathaniel Landau
2021-07-26 11:37:27 -04:00
parent 85d5734e2d
commit 313554e626

View File

@@ -334,6 +334,10 @@ _parseOptions_() {
shift shift
LOGLEVEL=${1} LOGLEVEL=${1}
;; ;;
-L | --logfile)
shift
LOGFILE="${1}"
;;
-n | --dryrun) DRYRUN=true ;; -n | --dryrun) DRYRUN=true ;;
-v | --verbose) VERBOSE=true ;; -v | --verbose) VERBOSE=true ;;
-q | --quiet) QUIET=true ;; -q | --quiet) QUIET=true ;;
@@ -362,6 +366,8 @@ _usage_() {
$ $(basename "$0") --loglevel 'WARN' $ $(basename "$0") --loglevel 'WARN'
-L, --logfile Full PATH to logfile. (Default is '${HOME}/logs/$(basename "$0")')
-n, --dryrun Non-destructive. Makes no permanent changes. -n, --dryrun Non-destructive. Makes no permanent changes.
-q, --quiet Quiet (no output) -q, --quiet Quiet (no output)
-v, --verbose Output more information. (Items echoed to 'verbose') -v, --verbose Output more information. (Items echoed to 'verbose')