Show enable/disable logs and pass debug logging to barnard
This commit is contained in:
committed by
Brandon McGinty
parent
d2dff7f521
commit
2cdbce8edb
+11
-2
@@ -511,11 +511,17 @@ send-logs() {
|
|||||||
|
|
||||||
manage-logs() {
|
manage-logs() {
|
||||||
local action
|
local action
|
||||||
|
local loggingAction
|
||||||
|
|
||||||
while : ; do
|
while : ; do
|
||||||
action="$(menulist "$(gettext "Toggle session logging")" "$(gettext "Send logs with wormhole")" "$(gettext "Go Back")")" || return
|
if (( saveSessionLogs )); then
|
||||||
|
loggingAction="$(gettext "Disable logs")"
|
||||||
|
else
|
||||||
|
loggingAction="$(gettext "Enable logs")"
|
||||||
|
fi
|
||||||
|
action="$(menulist "$loggingAction" "$(gettext "Send logs with wormhole")" "$(gettext "Go Back")")" || return
|
||||||
case "$action" in
|
case "$action" in
|
||||||
"$(gettext "Toggle session logging")") toggle-session-logging ;;
|
"$loggingAction") toggle-session-logging ;;
|
||||||
"$(gettext "Send logs with wormhole")") send-logs ;;
|
"$(gettext "Send logs with wormhole")") send-logs ;;
|
||||||
"$(gettext "Go Back")"|"") return ;;
|
"$(gettext "Go Back")"|"") return ;;
|
||||||
esac
|
esac
|
||||||
@@ -614,6 +620,9 @@ connect() {
|
|||||||
if [[ -f "$certFile" ]] && ! config_has_nonempty_value certificate; then
|
if [[ -f "$certFile" ]] && ! config_has_nonempty_value certificate; then
|
||||||
barnardArgs+=(-certificate "$certFile")
|
barnardArgs+=(-certificate "$certFile")
|
||||||
fi
|
fi
|
||||||
|
if [[ -n "$sessionLogFile" ]]; then
|
||||||
|
barnardArgs+=(-log debug -logfile "$sessionLogFile")
|
||||||
|
fi
|
||||||
|
|
||||||
command barnard "${barnardArgs[@]}" --fifo "$configDir/cmd" --buffers 16 |& log
|
command barnard "${barnardArgs[@]}" --fifo "$configDir/cmd" --buffers 16 |& log
|
||||||
barnardStatus=${PIPESTATUS[0]}
|
barnardStatus=${PIPESTATUS[0]}
|
||||||
|
|||||||
Reference in New Issue
Block a user