Welcome! Log In Create A New Profile

Advanced

A print command for writing to a log

Posted by jared 
A print command for writing to a log
July 22, 2009 07:59PM
It would be great if there were a directive for writing a string of my choice to a log file, such as:

[code]
location ~ /some/path/.*/foo {
print_to_log "In new rule I'm working on"
if ($something ~ ^reg(.*)exp$) {
print_to_log "$something matched; captured $1"
}
...
}
[/code]

I've read that nginx can be compiled in debug mode, but that's a really heavy solution. I generally want to write rules and iterate on them quickly.

Igor, thanks for all your excellent work on nginx!

Jared
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 93
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready