mirror of
https://github.com/itdoginfo/podkop.git
synced 2026-01-27 04:40:37 +03:00
fix: only print colored timestamp and message when stdout is a terminal
This commit is contained in:
@@ -18,7 +18,9 @@ nolog() {
|
||||
local timestamp
|
||||
timestamp=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
|
||||
if [ -t 1 ]; then
|
||||
echo -e "${COLOR_CYAN}[$timestamp]${COLOR_RESET} ${COLOR_GREEN}$message${COLOR_RESET}"
|
||||
fi
|
||||
}
|
||||
|
||||
echolog() {
|
||||
|
||||
Reference in New Issue
Block a user