Closed Rockybilly closed 3 months ago
The error log is directly written to the stderr before the error log is initialized. ngx.errlog can only get the error log after it is initialized.
errlog module and lua_capture_error_log fails to capture logs in workers when called from a privileged agent, and fails to get logs in privileged agent when called from worker
Each process only gets its error logs.
errlog module and lua_capture_error_log fails to capture logs in workers when called from a privileged agent, and fails to get logs in privileged agent when called from worker
Each process only gets its error logs.
Ah, this i didn't know. I thought the error logs was gathered eventually in a shared memory from all workers to be collected from any of the workers. Then it is not related to privileged agent at all, but just being different workers is enough.
I should say though, throughout my development, i read errlog.md multiple times and failed to realize this fact. Either it is not mentioned or is not mentioned enough :)
Thank you for your reply.
errlog
module andlua_capture_error_log
fails to capture logs in workers when called from a privileged agent, and fails to get logs in privileged agent when called from workerHere is an example config to reproduce, tried with 1.21.4.1 and 1.25.3.1
stdout:
get_logs output in content_by_lua_block
As you can see, the global error buffer is missing entries. I didn't know if the fault lay with
errlog
orprocess
modules so I opened the issue here.Cheers.