Skip to content

Commit

Permalink
Added a custom log format for nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
brutasse committed Sep 23, 2012
1 parent 8439492 commit bac6592
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nginx/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,12 @@ nginx:
- installed
service.running:
- enable: True
- watch:
- file: time-log

time-log:
file.managed:
- name: /etc/nginx/conf.d/time_log.conf
- source: salt://nginx/time_log.conf
- require:
- pkg: nginx
4 changes: 4 additions & 0 deletions nginx/time_log.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
log_format timed_combined '$remote_addr - $remote_user [$time_local]'
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
'$request_time $upstream_response_time $pipe';

0 comments on commit bac6592

Please sign in to comment.