在nginx配置中,如何直接在配置文件中显示一些日志文件?

lov*_*ing 5 nginx

我正在配置一个 nginx,并调试配置文件,

如何将配置文件中的内容直接显示到日志文件?

例如:

location ..... {

   to_log "some string";

   }
Run Code Online (Sandbox Code Playgroud)

Pix*_*xou 5

没有直接的方法(在 echo nginx 模块的待办事项列表上),但这个解决方案似乎很好https://serverfault.com/questions/404626/how-to-output-variable-in-nginx-log-for-调试