You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by "Wall, Mick" <Mi...@LloydsTSB.co.uk> on 2008/02/08 16:16:28 UTC

Additional log file

Hello, 
 
I have a requirement to log some additional information to a separate log
file.  Can I do this using some of the existing log API's or will I need to
create my own.
 
Thanks
 
Mick


This e-mail is only for the above addressees.  It may contain confidential or privileged information.  If you are not an addressee you must not copy, distribute, disclose or use any of the information in it or any attachments.  If you have received it in error please notify the sender and delete it immediately.

Lloyds TSB Bank plc.  Registered Office: 25 Gresham Street, London EC2V 7HN.  Registered in England and Wales, number 2065.  Telephone: 020 7626 1500.
Lloyds TSB Scotland plc.  Registered Office: Henry Duncan House, 120 George Street, Edinburgh EH2 4LH.  Registered in Scotland, number 95237.  Telephone: 0131 225 4555.
Cheltenham & Gloucester plc.  Registered Office: Barnett Way, Gloucester GL4 3RL.  Registered in England and Wales, number 2299428.  Telephone: 01452 372372.
Cheltenham & Gloucester Savings is a division of Lloyds TSB Bank plc.

Lloyds TSB Bank plc, Lloyds TSB Scotland plc and Cheltenham & Gloucester plc are authorised and regulated by the Financial Services Authority.  

Lloyds TSB Group plc.  Registered Office: Henry Duncan House, 120 George Street, Edinburgh EH2 4LH.  Registered in Scotland, number 95000.  Telephone: 0131 225 4555.
Lloyds TSB Group plc is a signatory to the Banking Codes.

Telephone calls may be monitored or recorded.


Re: Additional log file

Posted by Dirk-Willem van Gulik <di...@webweaving.org>.
On Feb 8, 2008, at 4:16 PM, Wall, Mick wrote:

> I have a requirement to log some additional information to a  
> separate log
> file.  Can I do this using some of the existing log API's or will I  
> need to
> create my own.

If you have that data in env variables, in the notes table or similar  
(or you can get them there from your modules, mod_perl code) etc-   
then you can simple add a custom log and write it out that way:

	LogFormat "%a %s %t \"%{User-agent}i\"" %{GeoIP}n %{GeoIP_USfield}n % 
{GeoIP_SpeedField}n

will extrat the note called 'GeoIP' from the r->notes table which was  
set by a module. If it comes from some java/backend - you can capture  
a header %{Foo}o header (but the client gets to see that header too).

Dw


Re: Additional log file

Posted by Eric Covener <co...@gmail.com>.
On Feb 8, 2008 10:16 AM, Wall, Mick <Mi...@lloydstsb.co.uk> wrote:
> Hello,
>
> I have a requirement to log some additional information to a separate log
> file.  Can I do this using some of the existing log API's or will I need to
> create my own.

If you can push the data into an environment variable (subprocess_env)
or a note, you can just use an additional LogFormat/CustomLog to
collect the data.

-- 
Eric Covener
covener@gmail.com