-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UID2-3315 update logging destination (#565)
* Change log name * Add crontab script * Copy crontab script in action * Use logrotate instead of modifying crontab * Add 0minutely file to run cronjob minutely * Use custom branch for testing * Run logrotate from the script * Renmae 0minutely to logrotate * Rename syslog-ng logs to operator.log * Change branch back to main
- Loading branch information
1 parent
7037d6e
commit ce3b04f
Showing
3 changed files
with
7 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
#!/bin/sh | ||
|
||
/usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf | ||
EXITVALUE=$? | ||
if [ $EXITVALUE != 0 ]; then | ||
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" | ||
fi | ||
exit 0 | ||
# Run the minutely jobs | ||
SHELL=/bin/bash | ||
PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
MAILTO=root | ||
* * * * * root /usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/var/log/operator-ip-*.log | ||
/var/log/operator.log | ||
{ | ||
rotate 30 | ||
daily | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters