Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #300 from edx/jrbl/broken_log_rotation
Browse files Browse the repository at this point in the history
rsyslog should log to {{log_bas_dir}}
  • Loading branch information
jrbl committed Oct 2, 2013
2 parents 8028e18 + d5a661d commit b25bf3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion playbooks/edx-west/stage-all.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- hosts: tag_environment_stage
- hosts: tag_environment_stage:!tag_function_nat
# exclude nat host b/c we can't log in to do thing with it anyway
#- hosts: tag_Name_bastion_stage
sudo: True
vars:
Expand Down
8 changes: 4 additions & 4 deletions playbooks/roles/common/templates/edx_rsyslog.j2
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ auth,authpriv.* /var/log/auth.log
$template tracking,"%syslogtag%%msg%\n"

# looks for [service_name=<name>] in the beginning of the log message,
# if it exists the log will go into /mnt/logs/<name>/edx.log, otherwise
# it will go into /mnt/logs/edx.log
$template DynaFile,"/mnt/logs/%syslogtag:R,ERE,1,BLANK:\[service_variant=([a-zA-Z_-]*)\].*--end%/edx.log"
# if it exists the log will go into {{log_base_dir}}/<name>/edx.log, otherwise
# it will go into {{log_base_dir}}/edx.log
$template DynaFile,"{{log_base_dir}}/%syslogtag:R,ERE,1,BLANK:\[service_variant=([a-zA-Z_-]*)\].*--end%/edx.log"

local0.* -?DynaFile
local1.* /mnt/logs/tracking.log;tracking
local1.* {{log_base_dir}}/tracking.log;tracking
#cron.* /var/log/cron.log
#daemon.* -/var/log/daemon.log
kern.* -/var/log/kern.log
Expand Down

0 comments on commit b25bf3b

Please sign in to comment.