Skip to content

Commit 0851fd3

Browse files
committed
logging tweaks
1 parent 3436581 commit 0851fd3

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

share/github-backup-utils/ghe-backup-config

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
# . $( dirname "${BASH_SOURCE[0]}" )/../share/github-backup-utils/ghe-backup-config
1515
#
1616
set +o posix
17+
# Terminal colors
18+
RED='\033[0;31m'
19+
GREEN='\033[0;32m'
20+
YELLOW='\033[0;33m'
21+
NC='\033[0m' # No Color
22+
1723
# Assume this script lives in share/github-backup-utils/ when setting the root
1824
GHE_BACKUP_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
1925

@@ -187,7 +193,7 @@ if [ -n "$GHE_VERBOSE" ]; then
187193
fi
188194
calling_script_name="$(caller | sed 's:.*/::')"
189195
date_format=$(date -u "+%FT%TZ")
190-
exec 3> >(awk -v c="$calling_script_name" d="$date_format" '{ print d" INFO ", c":", $0; fflush(); }' >>"$GHE_VERBOSE_LOG")
196+
exec 3> >(awk -v '{ print d" INFO ", c":", $0; fflush(); }' c="$calling_script_name" d="$date_format" >>"$GHE_VERBOSE_LOG")
191197
fi
192198
else
193199
exec 3>&1
@@ -563,13 +569,10 @@ restore-secret() {
563569
fi
564570
}
565571

566-
# Logging display and formatting functions
567572

568-
# Terminal colors
569-
RED='\033[0;31m'
570-
GREEN='\033[0;32m'
571-
YELLOW='\033[0;33m'
572-
NC='\033[0m' # No Color
573+
574+
575+
# Logging display and formatting functions
573576

574577
# Log a message to stdout
575578
log_level() {

0 commit comments

Comments
 (0)