[squid-users] does the logging of cache.log support the log modules like daemon, syslog, udp ...

Alex Rousskov rousskov at measurement-factory.com
Thu Feb 1 16:33:32 UTC 2024


On 2024-02-01 07:15, Dieter Bloms wrote:

> Is it possible to send the cache.logs to the syslog socket /dev/log ?

cache_log does not have access_log's concept of logging modules.

* To send level-0/1 cache.log messages to syslog, use "squid -s ..." or 
"squid -l... ...". By default, syslog is only used for a few special 
messages that are not printed to cache.log (e.g., "Exiting due to 
repeated, frequent failures") and these level-0 cache.log messages:

     FATAL: Received Segment Violation...dying.
     FATAL: Received Bus Error...dying.
     FATAL: Received signal ... ...dying.
     ERROR: Squid BUG: ...

and

     FATAL: <assertion text or a similar failure message>
     Squid Cache (Version ...): Terminated abnormally


* To send level-X (and more important) cache.log messages to standard 
error stream, use "squid -dX ...". That stderr output can be redirected 
as needed using shell output redirection mechanisms, of course. By 
default, modern Squids do not log to stderr in most cases.


The above two options do not tell Squid what cache.log messages to emit. 
They only affect which emitted cache.log messages to copy to syslog 
and/or stderr. To tell Squid what cache.log messages to emit, see "squid 
-X ...", debug_options, and cache_log_message. By default, Squid emits 
level-0/1 messages in most cases.


If the above information is not in Squid wiki, please consider 
submitting a pull request that adds (a polished version of) it:
https://github.com/squid-cache/squid-cache.github.io/pulls


HTH,

Alex.



More information about the squid-users mailing list