Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix logging to show correct date/times #336

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/winapps
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ readonly CONTAINER_NAME="WinApps" # FOR 'docker' AND 'podman' ONLY
readonly RDP_PORT=3389
readonly DOCKER_IP="127.0.0.1"
# shellcheck disable=SC2155 # Silence warnings regarding masking return values through simultaneous declaration and assignment.
readonly RUN="$(date)-${RANDOM}"
readonly RUNID="${RANDOM}" #Set a random int for the run ID to assist with logging

### GLOBAL VARIABLES ###
# WINAPPS CONFIGURATION FILE
Expand Down Expand Up @@ -162,7 +162,7 @@ Please run:
# Name: 'dprint'
# Role: Conditionally print debug messages to a log file, creating it if it does not exist.
function dprint() {
[ "$DEBUG" = "true" ] && echo "[$RUN] $1" >>"$LOG_PATH"
[ "$DEBUG" = "true" ] && echo "[$(date)-$RUNID] $1" >>"$LOG_PATH"
oskardotglobal marked this conversation as resolved.
Show resolved Hide resolved
}

# Name: 'waFixScale'
Expand Down
Loading