Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple access_log within server{} ( files + syslog ) #710

Closed
jlory opened this issue Nov 2, 2015 · 2 comments
Closed

Allow multiple access_log within server{} ( files + syslog ) #710

jlory opened this issue Nov 2, 2015 · 2 comments

Comments

@jlory
Copy link

jlory commented Nov 2, 2015

It seems that we can't have multiple access_log in the vhost conf, the reason why you would need more that one is if you have to log to a file and also send logs to syslog.

Is there a quick fix without modifying the existing code?

@jlory jlory changed the title Allow multiple access_log within server{} Allow multiple access_log within server{} ( files + syslog ) Nov 2, 2015
@GosthMan
Copy link

Yes there is add it like this on one line in the vhost section or http section depending what logs you want
access_log: syslog:server=logs:12301 graylog2_format; access_log /var/log/nginx/prod.ext.oca.com.ar.access.log
just change the server=logs with your server

@wyardley
Copy link
Collaborator

wyardley commented Oct 8, 2016

#888 adds this functionality in both main config and vhosts, though you can't set the format differently for each acess_log directive (without using the workaround above).

@wyardley wyardley closed this as completed Oct 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants