I have a test, where I specify a error_log_file section, however, the error_log assertion helper seems to not consider that i am specifying a custom error_log_file, and looks for the default servroot/logs/error.log
=== TEST 1: unauthorized GET
Without the correct headers, our openresty app should smack down this request.
--- log_level: debug
--- error_log_file: /var/log/custom/error.log
--- http_config eval: $::http_config
--- config eval: $::config
--- main_config eval: $::main_config
--- server_name eval: $::server_name
--- tcp_listen: 8080
--- tcp_reply eval
"HTTP/1.0 200\r\n\r\nhello world"
--- request
GET /
--- error_code: 403
--- error_log eval
["error here"]
Right now, it will not affect the --- error_log section and etc accordingly.
That seems to note this (limitation?), but I'm confused what the point of having a error_log_file section is if one can't use the error_log methods against the specified custom error.log file.
@patthiel Yeah, that error_log_file directive is not very useful for general use. It was just a quick hack to allow emitting error logs to special devices like /dev/stderr, IIRC.
I have a test, where I specify a
error_log_file
section, however, theerror_log
assertion helper seems to not consider that i am specifying a custom error_log_file, and looks for the defaultservroot/logs/error.log
I found this note in the documentation:
That seems to note this (limitation?), but I'm confused what the point of having a
error_log_file
section is if one can't use theerror_log
methods against the specified custom error.log file.