[squid-users] squid writes to /var/log/messages
sampei02 at tiscali.it
sampei02 at tiscali.it
Tue Dec 22 14:19:37 UTC 2020
I solved disabling ‘-s' option in squid startup script.
Thanks
> On 21 Dec 2020, at 15:36, Alex Rousskov <rousskov at measurement-factory.com> wrote:
>
> On 12/21/20 8:29 AM, sampei02 at tiscali.it <mailto: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.
>
> You already know from other responses that removing "-s" from your Squid
> command line options is the primary solution for stopping Squid from
> logging to syslog, but I wanted to add a caveat:
>
> * Some Squid messages are only logged to syslog.
> Those messages are logged to syslog regardless of the "-s" presence.
> I suspect they may also disregard the "-l facility" setting.
>
> ... where "logged to syslog" should be interpreted as "sent to the
> syslog daemon", of course.
>
> IMO, this caveat is essentially a Squid bug.
>
> You can prevent all Squid messages from appearing in system log files by
> configuring your syslog daemon accordingly.
>
>
> HTH,
>
> Alex.
>
>
>>> On 21 Dec 2020, at 11:31, Ambrose Li 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 <mailto: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).
>>>
>>>
>>> --
>>> Ambrose Li <ambrose.li at gmail.com> | Time zone: GMT-5 (Eastern)
>>> ambroseli.ca
>>>
>>> “Any organization which designs a system… will inevitably produce a
>>> design whose structure is a copy of the organization’s communication
>>> structure.” — Conway’s Law
>>>
>>> _______________________________________________
>>> squid-users mailing list
>>> squid-users at lists.squid-cache.org
>>> http://lists.squid-cache.org/listinfo/squid-users
>>
>> _______________________________________________
>> squid-users mailing list
>> squid-users at lists.squid-cache.org <mailto:squid-users at lists.squid-cache.org>
>> http://lists.squid-cache.org/listinfo/squid-users <http://lists.squid-cache.org/listinfo/squid-users>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20201222/51bd1821/attachment.htm>
More information about the squid-users
mailing list