Syslog files per server entry

Hi,

We use the following:

error_log syslog:server=127.0.0.1,facility=local4,tag=nginx warn;
access_log
syslog:server=127.0.0.1,facility=local5,tag=nginx,severity=info main;

Just with the default combined format.

If however I want to have a separate access log for certain server
blocks, how do I go about that as if I change access_log to say
access_ian_log it errors.

Thanks in advance.
Ian

On Thu, Nov 27, 2014 at 04:10:58PM +0000, Ian Winter wrote:

Hi there,

error_log syslog:server=127.0.0.1,facility=local4,tag=nginx warn;
access_log syslog:server=127.0.0.1,facility=local5,tag=nginx,severity=info
main;

If however I want to have a separate access log for certain server blocks, how
do I go about that

http://nginx.org/r/access_log

Put as many “access_log” lines as you want at the level you care about.

Normal nginx inheritance rules apply.

(The request is logged in the location{} it finishes in.)

f

Francis D. [email protected]