In httpd's access logs, I want to get a log as soon as an API is hit. With the current access log configuration in httpd.conf(below), the API logs come in only when the response comes
<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b %{ms}T \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b %{ms}T" common
<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b %{ms}T \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
#CustomLog "logs/access_log" common
#
# If you prefer a logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
CustomLog "logs/access_log" combined
</IfModule>
Sample output that I get in access_logs
1.187.15.66 - - [03/Nov/2018:08:16:10 +0000] "POST /v13/user/login HTTP/1.1" 200 1394
1.187.15.66 - - [03/Nov/2018:08:16:10 +0000] "POST /v13/user/login HTTP/1.1" 200 1394 1556 "-" "Mozilla/5.0 ( compatible )"
49.14.67.179 - - [03/Nov/2018:08:16:11 +0000] "POST /v13/zvice/detailscard/9J5EDAR3Y2PZA HTTP/1.1" 200 37133
49.14.67.179 - - [03/Nov/2018:08:16:11 +0000] "POST /v13/zvice/detailscard/9J5EDAR3Y2PZA HTTP/1.1" 200 37133 4254 "-" "Mozilla/5.0 ( compatible )"
The problem is that sometimes my APIs remain in processing mode, ex: a long running query gets hit, and the system slows down. Since I dont get any log of the API which is hit until it is returned, debugging becomes a nightmare.
Is there an access_log configuration in httpd.conf which would help insert a log in access_log file as soon as the API is hit?