Hi, there is indeed no built-in way to customize the error_log format. I have seen some options but I don’t take this as a recommendation, as I haven’t tried them myself:
Right. You can’t use the “error code escape” then.
I was not proposing modifying the log files. The exact solution will depend on your sytem. You could do a very simple demon which translates every new line on the logs to a JSON line in a different, separate file, and then use that to feed your system. Or you could batch the json requests, aggregate them in memory, and periodically send your aggregator a POST request, if it accepts that.