Log custom header variable

Discussion in 'Apache' started by mummana, Oct 2, 2009.

  1. #1
    Hi,

    We set a custom variable in HTTP header. We want to log the custom variable in apache access logs.

    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{XYZ}i\"" combined
    CustomLog logDir/access_log combined

    We tried logging whole header info., this is coming as empty string?

    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Header}i\"" combined
    CustomLog logDir/access_log combined

    Could you please help, how to read a custom header variable or whole header?

    Thanks
    Srini
     
    mummana, Oct 2, 2009 IP