Re: [squid-users] New user - few questions

From: Naira Kaieski <naira_at_faccat.br>
Date: Wed, 23 Nov 2011 15:23:19 -0200

Hi,

You can try:

create your logfomat with infomation that you want:

logformat my_log %{%d/%b/%Y:%H:%M:%S}tl %ru

# default for sarg
cache_access_log /var/log/squid/access.log squid
# your log
cache_access_log /var/log/squid/my_access.log my_log

where in logformat:
%ru = Request URL, without the query string
%{format}tl = Date of request, strftime format (localtime)

see http://devel.squid-cache.org/customlog/logformat.html

Atenciosamente,
Naira Kaieski
Linux Professional Institute - LPI 101

Em 23/11/2011 14:38, Sw_at_g escreveu:
> Hi Again,
>
> I had a further look at it, and understand a bit more now. What I
> would like to achieve is to have the access log looking as below, and
> only registering individual web page accessed rather than every object
> (within the page requested by the user)
>
> day:month:year-hour:minute:second url_of_the_page_requested_by_the_user
>
> Looking forward for your reply,
>
> Kind regards,
>
>
> On 22/11/11 22:13, Amos Jeffries wrote:
>> On Tue, 22 Nov 2011 18:11:26 +0000, Sw_at_g wrote:
>>> Hi all,
>>>
>>> First of all, I would like to thank you for your time and effort for
>>> providing such a great tool.
>>>
>>> I am a new user on archlinux, using Squid locally. I have a few
>>> questions, regarding the setup most of all.
>>>
>>> - Is it possible to change the information logged into access.log? I
>>> would like it like that
>>>
>>> => date +%#F_%T address_visited (I would like to replace the
>>> timestamps with a human readable time/date and just the website
>>> visited)
>>
>> http://wiki.squid-cache.org/SquidFaq/SquidLogs
>> http://www.squid-cache.org/Doc/config/access_log
>> http://www.squid-cache.org/Doc/config/logformat
>>
>>>
>>> => Is it possible to limit the size of the logs from within the
>>> squid.conf file?
>>>
>>
>> No. You need to integrate log management tools like logrotate.d or
>> cron jobs to control when log rotation occurs.
>>
>>
>>> And the last question, I have that "error" coming up from the cache.log
>>>
>>> IpIntercept.cc(137) NetfilterInterception: NF
>>> getsockopt(SO_ORIGINAL_DST) failed on FD 29: (92) Protocol not
>>> available
>>>
>>> And the browsing become really slow, even page aren't opening
>>> anymore? Any advice?
>>
>> Squid is unable to locate the client details in the kernel NAT table.
>> NAT *must* be done on the Squid box.
>>
>> Also ensure that you have separate http_port lines for the different
>> types of traffic arriving at your Squid.
>>
>> Amos
Received on Wed Nov 23 2011 - 17:23:30 MST

This archive was generated by hypermail 2.2.0 : Thu Nov 24 2011 - 12:00:03 MST