Skip to content

Commit 7fb259c

Browse files
committed
use date on console log
1 parent 0bebd96 commit 7fb259c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

config/soda/log.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424
LOG_FILE=/tmp/soda.log
2525
SODA_DATE_LOG_PATTERN="%F %T"
2626
SODA_FILE_LOG_PATTERN="%s | %-6s | %s\n"
27-
SODA_CONSOLE_LOG_PATTERN="%-6s: %s"
27+
SODA_CONSOLE_LOG_PATTERN="%s | %-6s | %s"

scripts/soda/log.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ file_log() {
7878

7979
# Put a log message in console
8080
console_log() {
81-
local message="$(printf "$SODA_CONSOLE_LOG_PATTERN" "$1" "$2")"
81+
local message="$(printf "$SODA_CONSOLE_LOG_PATTERN" "$(date +"${SODA_DATE_LOG_PATTERN}")" "$1" "$2")"
8282
if [[ -n "$3" ]]; then
8383
echo "$($3 "$message")"
8484
else

0 commit comments

Comments
 (0)