Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    [SOLVED] Where to configure squid log format please

    Scheduled Pinned Locked Moved Cache/Proxy
    2 Posts 1 Posters 3.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      deajan
      last edited by

      Hello,

      I'm searching a way to reconfigure squid's default log to include date and time instead of time since squid start.
      The normal config string would be```
      logformat squid %tl %6tr %>a %Ss/%03Hs % <st %rm="" %ru="" %un="" %sh="" %<a="" %mt<="" pre="">Is there anyway to make this persistent even after pfSense upgrades ?

      Regards,
      Ozy.</st>

      NetPOWER.fr - some opensource stuff for IT people

      1 Reply Last reply Reply Quote 0
      • D
        deajan
        last edited by

        Well I found, so here's the ugly hack.

        In local cache, activate Cache Dynamic Content and add the following in Custom Refresh Patterns

        logformat special %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %ss:%sh<br="">access_log /var/squid/logs/access.log special</st>

        There are already predefined logformats like the special here so you could actually just add access_log /var/squid/logs/access.log common but in my case, I can play with the format.

        Also, log into ssh and launch

        service squid.sh restart
        

        to see whether there are error messages or not.

        NetPOWER.fr - some opensource stuff for IT people

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.