Skip to content

Access log to output plugin variables #13311

Answered by hanshuebner
MUI-Pop asked this question in Help
Discussion options

You must be logged in to vote

Hello @MUI-Pop,

it is difficult to say what the best way is as that depends on your environment and deployment model. If you need to change the format of the access_log file which is written by nginx, then you'll need to work with a custom nginx configuration template, define the new variables and the access log format to use those variables, and then set the variables from your plugin in ngx.ctx. This approach is a little fiddly, however, in particular as you'll need to make sure that your custom templates keeps working across upgrades.

If you have a little more freedom with respect to how your access log is written, you could use a custom plugin to write the access log in the format tha…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@chobits
Comment options

@MUI-Pop
Comment options

Answer selected by chobits
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants