print errormessage (like %E in ERR_* pages) in squid logfile ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

print errormessage (like %E in ERR_* pages) in squid logfile ?

Dieter Bloms-3
Hello,

more and more clients aren't browser but are programs, which call a
restapi through our squid proxy.

Those clients aren't able to show the errorpage (ERR_*) from proxy in
case the request wasn't successful for any reason.

I added %err_code and %err_detail, but %err_detail is filled with "-" sign all the
time in the logfiles.

For example:
If the connection to a webserver fails %err_code is filled with ERR_CONNECT_FAIL, but
%err_detail is filled with "-" instead of the messages "(110) Connection %timed out"

Is it possible to log the error message like %E in the error pages ?

Thank you very much.


--
Regards

  Dieter

--
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
From field.
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: print errormessage (like %E in ERR_* pages) in squid logfile ?

Alex Rousskov
On 6/17/20 9:17 AM, Dieter Bloms wrote:

> more and more clients aren't browser but are programs, which call a
> restapi through our squid proxy.
>
> Those clients aren't able to show the errorpage (ERR_*) from proxy in
> case the request wasn't successful for any reason.
>
> I added %err_code and %err_detail, but %err_detail is filled with "-" sign all the
> time in the logfiles.
>
> For example:
> If the connection to a webserver fails %err_code is filled with ERR_CONNECT_FAIL, but
> %err_detail is filled with "-" instead of the messages "(110) Connection %timed out"
>
> Is it possible to log the error message like %E in the error pages ?


Hello Dieter,

    No, it is not possible to log %E to access.log, and the errno-based
%E itself is often useless in such situations, especially in the
official code where it is often lost or stale.

However, your use case _is_ valid, and Factory is working on improving
detailing of various connectivity problems similar to the ones you are
talking about. There is no official pull request yet, but we are getting
very close. If you would like, please feel free to test-drive our
master/v6-based https://github.com/measurement-factory/squid/pull/63


HTH,

Alex.
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users