Hi,
if somebody could implement the following line to the squid.conf the date in access.log is more readable.
logformat readable %{%d.%m.%y %H:%M:%S}tl %>a %Ss %ru
Hi,
if somebody could implement the following line to the squid.conf the date in access.log is more readable.
logformat readable %{%d.%m.%y %H:%M:%S}tl %>a %Ss %ru
I have tested this, but I think it may break all log file analysis tools (lightsquid comes to mind).
I use this command to read logs:
awk '{print strftime("%c", $1), $0}' /var/log/squid/access.log
If you could confirm that external tools like lightsquid do not break with the new log format, Iâll sponsor your request.
I canât test it, because if I want to open Lightsquid from Server-Manager / Applications I only get an errorpage:
Nethgui:
404 - Language not found
1377519247
I didnât do any changes at squid.conf till now.
It dosnât make any difference if I test it with english or german language.
Can somebody help me with this problem?
It works for me after reboot NS.
Also after I have installed Shared folders + samba audit, when I wanted to access Samba audit I had the same âerrorâ. After reboot NS, everything worked fine.
Thanks for your answer, Iâll try it later because I canât rebbot at this time.
Iâll be back if Iâve tested it.
Ok thanks, it works well now. Iâll test to change the config now.
Can somebody help me? Iâve copied the /etc/e-smith/templates/etc/squid.conf/90options to
/etc/e-smith/templates-custom/etc/squid.conf/90options and modified it with the line in my first post. After that I restart the squid-service but nothing happened to my access.log.
In a âself-buildâ squid without nethserver this line in the squid.conf is the road to success.
The correct path name is /etc/squid/squid.conf.
I think youâre missing a step before restart:
expand-template /etc/squid/squid.conf
Youâre right Iâve forgotton the expand-template command.
But now I have the next problem:
expand-template /etc/squid/squid.conf
WARNING in /etc/e-smith/templates-custom//etc/squid/squid.conf/90options: Operator or semicolon missing before %H at /etc/e-smith/templates-custom//etc/squid/squid.conf/90options line 4.
WARNING in /etc/e-smith/templates-custom//etc/squid/squid.conf/90options: Ambiguous use of % resolved as operator % at /etc/e-smith/templates-custom//etc/squid/squid.conf/90options line 4.
ERROR in /etc/e-smith/templates-custom//etc/squid/squid.conf/90options: Program fragment delivered error <<syntax error at /etc/e-smith/templates-custom//etc/squid/squid.conf/90options line 4, near âH:â>> at template line 4
ERROR: Template processing failed for //etc/squid/squid.conf: 2 fragments generated warnings, 1 fragment generated errors
at /sbin/e-smith/expand-template line 45.
In configfile it is correct without an operator. I tried it with a semicolon in the template, than I only get this error:
expand-template /etc/squid/squid.conf ERROR in /etc/e-smith/templates-custom//etc/squid/squid.conf/90options: Program fragment delivered error <<syntax error at /etc/e-smith/templates-custom//etc/squid/squid.conf/90options line 4, near â%H:â>> at template line 4
ERROR: Template processing failed for //etc/squid/squid.conf: 1 fragment generated errors
at /sbin/e-smith/expand-template line 45.
Curly brackets need to be protected in templates.
Substitute all { and } with \{ and \}.
Hi filippo,
can you explain it to me with an example?
I donât know how to protect the curly brackets.
You wrote Iâve to change { and ] to { and }, but I only used { and }
Discourse need brackets protection too.
Substitute all { and } with \{ and \}.
Thanks, the expand-template command works without any errors now, but the access.log didnât change the format. Iâ ve set my entry to the end of 90options, is it a problem?
Iâve forgotton one line in my template, now it is working and I will test it.
This is my template 90options at this time:
#
# 90options
#
# logformat (name) (format specification)
logformat readable %{%d.%m.%y %H:%M:%S}tl %>a %Ss %ru
#access_log /var/log/squid/access.log squid
access_log /var/log/squid/access.log readable
forward_max_tries 25
shutdown_lifetime 1 seconds
buffered_logs on
max_filedesc 16384
logfile_rotate 0
I think you are right, lightsquid dosnât work anymore. It dosnât show anything since the point Iâve changed the config.
I donât need lightsquid, so for me itâs a solution, but not for everyone.
Whatâs about the idea to change the request of the logfile in the gui logviewer in the way Filippo wrote.