0 Replies Latest reply on May 18, 2011 9:22 AM by ericappelboom

    MGW 7.1 Custom log handler - w3c squid format - almost there

    ericappelboom

      Hi,

      Customer requires MWG 7.1 to output logs in squid w3c format for legacy reporting tool.

      I have created a second log.handeler which is almost perfect, but I need a little help;

       

      Squid Format:     1011164724.171 1337 192.168.1.3 TCP_MISS/200 20110 GET http://images.google.com/ username DIRECT/203.190.124.18 text/html

      MWG7.1 Format: 1305755021 duration   192.168.1.3 TCP_MISS/200 28668 GET http://images.google.com/ username DIRECT/66.102.11.104 text/html

       

      As you see above I have two challenges;

      1. A duration property in milliseconds (the elapsed time received, request and response)

      2. My 2nd challenge  is DIRECT, the Hierarchy Code, is a fixed value and not from any property. Is this available?

       

      Is there any way to get the duration of the request logged in millseconds as the reporting tool uses this to summerise session duration.

       

      Number.ToString (DateTime.ToNumber)

      " "

      "duration"

      " "

      IP.ToString (Client.IP)

      " "

      Cache.Status

      "/"

      Number.ToString (Response.StatusCode)

      " "

      Number.ToString (BytesToClient)

      " "

      Command.Name

      " "

      URL

      " "

      String.ReplaceIfEquals (Authentication.UserName, "", "-")

      " DIRECT/"

      IP.ToString (URL.Destination.IP)

      " "

      MediaType.ToString (MediaType.FromHeader)

       

      Message was edited by: ericappelboom on 5/18/11 9:22:29 AM CDT

       

      Message was edited by: ericappelboom on 5/18/11 9:22:51 AM CDT