Search squid archive

Compiling Squid without log messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I want to have a minimal Squid installation.
So I compiled disabling everything I don't need.
The resulting /usr/sbin/squid is 3.4 Mb.

Since I don't need logging, I decided to remove that as well, but its
not easy to do with sed since sometimes log messages span multiple
lines.

So I changed the definition for debugs() in Debug.h like this:


 /* Debug stream */
+#ifdef NODEBUG
+#define debugs(SECTION, LEVEL, CONTENT) ((void)0)
+#else
 #define debugs(SECTION, LEVEL, CONTENT) \
    do { \
         if ((Debug::level = (LEVEL)) <= Debug::Levels[SECTION]) { \
@@ -116,6 +119,7 @@
             Debug::finishDebug(); \
         } \
    } while (/*CONSTCOND*/ 0)
+#endif


And compiled with -DNODEBUG.
The resulting binary is 2.1 Mb, a 60% size reduction!

But it doesn't work properly, and since there is no log, its hard to debug.

A trace shows it accepts requests, makes them to the HTTP server, but
after that it closes the connection to the HTTP client.

Any ideas?
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux