Skip to content

Commit

Permalink
mirror log in a custom log file
Browse files Browse the repository at this point in the history
  • Loading branch information
fabricionaweb committed Sep 23, 2023
1 parent c9e3b97 commit f96774d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/scripts/recyclarr
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
TERM=xterm
# Default appdata folder
APPDATA=/root/.config/recyclarr
# Our custom log file
LOGFILE="recyclarr_$(date +%F).log"
# First argument. Expects "version" or "nchan"
ARG1="$1"
# Second argument. Expect "config file" or "-p" or "-d"
Expand Down Expand Up @@ -41,6 +43,7 @@ publish() {
# Filter preview and debug from syslog - too much info
if [[ -z "$preview" && -z "$debug" ]]; then
logger -t recyclarr "$1"
echo "[$(date +%T)] $1" >>"$APPDATA/logs/cli/$LOGFILE"
fi

# Publish to frontend if the argument is nchan
Expand Down

0 comments on commit f96774d

Please sign in to comment.