[squid-users] squid writes to /var/log/messages
Matus UHLAR - fantomas
uhlar at fantomas.sk
Mon Dec 21 13:44:00 UTC 2020
>> I can confirm that squid will write to /var/log/messages if syslog logging is
>> enabled AND syslog is configured to write to /var/log/messages (this is the
>> default behaviour on some Linux distributions, such as Debian, but not Ubuntu).
On 21.12.20 14:29, sampei02 at tiscali.it wrote:
>My distro is Centos7 and rsyslog is enabled and It’s configured to write
>to /var/log/messages; it’s the default behaviour. But how can I avoid
>Squid writes into this file? I chose the Squid default log files which are
>contained into /var/log/squid/ folder.
note that the messages you poster are usually sent to cache_log, not
access_log, so check your cache_log settings.
as noted below, the "-s" option for squid makes it log to syslog, so you
need to remove that option off your systemd unit file or init.d file,
whichever is used on centos7.
>> On 21 Dec 2020, at 11:31, Ambrose Li <ambrose.li at gmail.com> wrote:
>>
>> On Mon, Dec 21, 2020 at 11:01:07PM +1300, Amos Jeffries wrote:
>>> On 21/12/20 9:55 pm, sampei02 at tiscali.it wrote:
>>>> Ok, I noted these 2 squid processes:
>>>>
>>>> root /usr/sbin/squid -sYC
>>>> squid (squid-1) --kid squid-1 -sYC
>>>>
>>>> -s means "Enable logging to syslog”
>>>>
>>>> This option ‘-s’ could explain writing to messages ?
>>>
>>> Squid does not write to /var/log/messages. On startup before Squid reads any
>>> configuration about whether cache.log or syslog is to be used it logs to
>>> stderr.
>>>
>>> That stderr channel is handled by whatever init system or shell is starting
>>> Squid. /var/log/messages is the init system log file.
>>
>> Actually no, /var/log/messages is not an init system log file; on some Linux
>> distros it is a default log location for syslog.
>>
>> I can confirm that squid will write to /var/log/messages if syslog logging is
>> enabled AND syslog is configured to write to /var/log/messages (this is the
>> default behaviour on some Linux distributions, such as Debian, but not Ubuntu).
--
Matus UHLAR - fantomas, uhlar at fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
- Holmes, what kind of school did you study to be a detective?
- Elementary, Watkins. -- Daffy Duck & Porky Pig
More information about the squid-users
mailing list