error_log syslog:server=127.0.0.1,tag=app1tag info;
In LUA code I'm using:
ngx.log(ngx.INFO, auditstuff)
Which generates:
Dec 11 01:42:08 spg-dev2 app1tag: 2014/12/11 01:42:08 [info] 26544#0: *704 [lua] authSession.lua:31: audit(): "USER_REQUEST_AUTHZ" SESSION_ID:"_9d25b0d4a16ae6fbd33c2f1c9129e3b26e433a8471" SUBJECT:"us...@gmail.com" RESULT:"ALLOW" RESULT:"NA - UserName=us...@gmail.com RemoteIP=10.123.123.123 RelayDomain=app1.spg-dev2.domain.info firstName=Martin lastName=Gee Groups=Portal Sales Group:Portal Admin Group:Portal Authorizer Group:Everyone ", client: 10.123.123.123, server: app1.spg-dev2.domain.info, request: "GET /logo.png HTTP/1.1", host: "app1.spg-dev2.domain.info", referrer: "https://app1.spg-dev2.domain.info/"
My question, can we define our own log format while logging via ngx.log .... (syslog)?