fix(log): Disallow multi-logging
Make logging options mutually-exclusive to avoid confusion.
This commit is contained in:
@@ -207,9 +207,9 @@ writeLog() {
|
|||||||
PT_LOG_LEVEL="$(standardizeLogLevels "$2")"
|
PT_LOG_LEVEL="$(standardizeLogLevels "$2")"
|
||||||
([ "$logDebug" -eq 0 ] && [ "$PT_LOG_LEVEL" = "DEBUG" ]) && return
|
([ "$logDebug" -eq 0 ] && [ "$PT_LOG_LEVEL" = "DEBUG" ]) && return
|
||||||
|
|
||||||
([ "$logToJournal" -eq 1 ]) && writeJournalDLog "$@"
|
([ "$logToJournal" -eq 1 ]) && writeJournalDLog "$@" && return
|
||||||
([ "$useJsonLogFmt" -eq 1 ]) && writeJsonLog "$@"
|
([ "$useJsonLogFmt" -eq 1 ]) && writeJsonLog "$@" && return
|
||||||
([ "$useSyslogLogFmt" -eq 1 ]) && writePlainTextLog "$@"
|
([ "$useSyslogLogFmt" -eq 1 ]) && writePlainTextLog "$@" && return
|
||||||
}
|
}
|
||||||
|
|
||||||
scriptExamples() {
|
scriptExamples() {
|
||||||
|
|||||||
Reference in New Issue
Block a user