From c411820cf78cf0d0c8dd70b350c0e5ea98339c7a Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Mon, 29 Sep 2008 21:36:52 +1300 Subject: [PATCH] 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 its error page translations. --- src/cf.data.pre | 14 ++++++++++++++ src/errorpage.cc | 3 +++ src/structs.h | 1 + 3 files changed, 18 insertions(+) diff --git a/src/cf.data.pre b/src/cf.data.pre index e5655511ed..35147c0100 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -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 diff --git a/src/errorpage.cc b/src/errorpage.cc index 0cd6b22a98..29eedb4e02 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -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) { diff --git a/src/structs.h b/src/structs.h index 77b905b66a..2d8621b35e 100644 --- a/src/structs.h +++ b/src/structs.h @@ -550,6 +550,7 @@ struct SquidConfig char *errorDirectory; #if USE_ERR_LOCALES char *errorDefaultLanguage; + int errorLogMissingLanguages; #endif char *errorStylesheet; -- 2.47.3