Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: error_log does not consider error_log_file #106

Open
patthiel opened this issue Oct 2, 2020 · 1 comment
Open

bug: error_log does not consider error_log_file #106

patthiel opened this issue Oct 2, 2020 · 1 comment

Comments

@patthiel
Copy link
Contributor

patthiel commented Oct 2, 2020

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"]

I found this note in the documentation:

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 patthiel changed the title bug: error_log does not consider check error_log_file bug: error_log does not consider error_log_file Oct 2, 2020
@agentzh
Copy link
Member

agentzh commented Oct 2, 2020

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants