]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Log to cache.log what languages users are attempting to auto-negotiate for translations.
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 29 Sep 2008 08:36:52 +0000 (21:36 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 29 Sep 2008 08:36:52 +0000 (21:36 +1300)
Successful negotiations are not logged. Only failures
have meaning to indicate that Squid may need an upgrade
of its error page translations.

src/cf.data.pre
src/errorpage.cc
src/structs.h

index e5655511edb4206f58ecdb0c864120e97f054119..35147c010032487a6878e0c71a914ceb38909942 100644 (file)
@@ -4786,6 +4786,20 @@ DOC_START
        http://wiki.squid-cache.org/Translations
 DOC_END
 
+NAME: error_log_languages
+IFDEF: USE_ERR_LOCALES
+TYPE: onoff
+LOC: Config.errorLogMissingLanguages
+DEFAULT: on
+DOC_START
+       Log to cache.log what languages users are attempting to
+       auto-negotiate for translations.
+
+       Successful negotiations are not logged. Only failures
+       have meaning to indicate that Squid may need an upgrade
+       of is error page translations.
+DOC_END
+
 NAME: err_page_stylesheet
 TYPE: string
 LOC: Config.errorStylesheet
index 0cd6b22a98bc5e0e5abd9ebe3b56eaa93b29c391..29eedb4e02d8c1443d9447698a528dd12b688404 100644 (file)
@@ -969,6 +969,9 @@ ErrorState::BuildContent()
                     err_language = xstrdup(reset);
                     break;
                 }
+                else if(Config.errorLogMissingLanguages) {
+                    debugs(4, DBG_IMPORTANT, "WARNING: Error Pages Missing Language: " << reset);
+                }
 
 #if HAVE_GLOB
                 if( (dt - reset) == 2) {
index 77b905b66a76e406f6265aea5e3387ddb47cf951..2d8621b35ed97e20b32f7df3ab3a48601e686965 100644 (file)
@@ -550,6 +550,7 @@ struct SquidConfig
     char *errorDirectory;
 #if USE_ERR_LOCALES
     char *errorDefaultLanguage;
+    int errorLogMissingLanguages;
 #endif
     char *errorStylesheet;