Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In nginx config, how to show something to log file directly in the config file?

Tags:

nginx

I'm config a nginx, and debugging the config file,

How to show something from the config file directly to log file?

for example:

location ..... {

   to_log "some string";

   }
like image 523
lovespring Avatar asked Sep 12 '14 13:09

lovespring


1 Answers

There is no direct way (on the todo list of the echo nginx module), but this solution seems fine https://serverfault.com/questions/404626/how-to-output-variable-in-nginx-log-for-debugging

like image 72
Pixou Avatar answered Dec 19 '22 21:12

Pixou