Apache Trafficserver

Thursday June 27, 2013

Squid binary log with unmapped URL

The Squid log format that we have by default in Traffic Server is a standard format that works well for proxies. It's also well supported by existing log analyzers etc. However, in some cases, where you map many domains to one origin server, the logs produced aren't particularly useful. Why? Because the default Squid log format logs the remapped URL, and not the original client URL. There is of course an easy way to fix this, using our custom log formats.

  1. Disable the original Squid log format, and enable the custom logs.
  2. Create the new Squid log format in logs_xml.config

Details below!

-- Leif

records.config

CONFIG proxy.config.log.logging_enabled INT 3
CONFIG proxy.config.log.custom_logs_enabled INT 1
CONFIG proxy.config.log.squid_log_enabled INT 0 

logs_xml.config

<LogFormat>
  <Name = "squid_unmapped"/>
  <Format = "%<cqtq> %<ttms> %<chi> %<crc>/%<pssc> %<psql> %<cqhm> %<cquuc> %<caun> %<phr>/%<pqsn> %<psct> %<xid>"/>
</LogFormat>

<LogObject>
  <Format = "squid_unmapped"/>
  <Filename = "squid"/>
  <Mode = "binary"/>
</LogObject>


Comments:

This reminded me of https://issues.apache.org/jira/browse/TS-1521 - perhaps it's time we look into adding a <Compression = "true" /> option?

Posted by Igor Galić on June 27, 2013 at 11:49 PM PDT #

Great post about this. I'm surprised to see someone so educated in the matter. Excellent post. I was checking continuously this blog and I'm impressed! Extremely useful information particularly the last part I care for such information a lot.

Posted by trading stocks on September 01, 2013 at 01:08 AM PDT #

Must be thanks for the great post look here http://gta5moneyonline.net and gta v online money generator.

Posted by click on January 06, 2019 at 07:43 AM PST #

That's beautiful ! Muy muy bueno! Excelente

Posted by sildalis on July 20, 2019 at 09:53 AM PDT #

The post is exciting and it mentions that Squid binary log with unmapped URL. It is great and thanks for sharing the post as it is useful. It says that the Squid log format that we have by default in Traffic Server is a standard format that works well for proxies. It's also well backed up by existing log analyzers. But, in some cases, where you map lots of domains to one origin server, the logs produced aren't mainly helpful.

Posted by Essays Chief on November 13, 2019 at 02:32 AM PST #

Thanks for sharing this!

Posted by About us on November 21, 2019 at 05:26 AM PST #

Thanks a lot for this information regarding Squid log format.

Posted by Contact us on November 21, 2019 at 05:47 AM PST #

Great entry! Thanks for posting!

Posted by bathroomremodelingspringfieldva.com on November 28, 2019 at 06:32 PM PST #

Thanks for sharing this entry! http://sidingspringfieldva.com/ | https://roofingspringfieldva.com/ | https://roofingarlingtonva.com/

Posted by Kyle Beron on December 18, 2019 at 10:09 AM PST #

Thanks for sharing this entry! https://sidingalexandriava.com

Posted by Michael on December 20, 2019 at 06:40 AM PST #

Thank you so much for sharing this entry!

Posted by www.treeservicearlingtonva.com/ on December 21, 2019 at 06:23 AM PST #

Amazing entry post!

Posted by Visit us on December 23, 2019 at 09:46 AM PST #

Excellent entry! Thanks for sharing this post! https://landscapermanassasva.com

Posted by Warren Patron on December 24, 2019 at 01:10 AM PST #

Thanks for sharing the easy way to fix the squid log entry. https://kmroofingandcontracting.com

Posted by Bryant on January 03, 2020 at 08:13 AM PST #

 shadi anudan 2018 shadi anudan form in pdf shadi anudan online registration ... UP Vivah Anudan Yojana 2019 has been started by the Uttar Pradesh  https://pradhanmantri-yogana.in/shadi-anudan-2018-2019/

Posted by Shadi-anudan-2018-2019 on January 17, 2020 at 01:39 AM PST #

I need just fresh logs to be generated in my Logfile each time when I run any scripts. Would you be able to help on this what changes needs be done in .xml file?

Posted by Courseworkempire on February 19, 2020 at 12:33 AM PST #

Post a Comment:
Comments are closed for this entry.

Calendar

Search

Hot Blogs (today's hits)

Tag Cloud

Categories

Feeds

Links

Navigation