mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-04-10 19:15:12 +00:00
LOGGER: removing some error outputs with conditinals
This commit is contained in:
parent
3bee4f58fc
commit
5a22e78b8d
|
@ -92,6 +92,9 @@ log() {
|
|||
# Write the log message to the log file
|
||||
if [ ! -f "$logfile" ]; then
|
||||
#echo "$timestamp [WARN] Log file not found in \"$logfile\", creating it" >&2 # Disabled it as it's always appearing because of log rotation
|
||||
if [[ ! -d "$(dirname "$logfile")" ]]; then
|
||||
mkdir -p "$(dirname "$logfile")"
|
||||
fi
|
||||
touch "$logfile"
|
||||
fi
|
||||
echo "$log_message" >> "$logfile"
|
||||
|
|
Loading…
Reference in a new issue