SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[enh] logging added
Adam Tauber6cbd29f674c1
diff --git a/searx/__init__.py b/searx/__init__.pyindex 46685817a..110f46af8 100644--- a/searx/__init__.py+++ b/searx/__init__.py@@ -15,9 +15,9 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.(C) 2013- by Adam Tauber, <[email protected]>'''+import loggingfrom os import environfrom os.path import realpath, dirname, join, abspath-from searx.https_rewrite import load_https_rulestry:from yaml import loadexcept:@@ -45,7 +45,17 @@ else:with open(settings_path) as settings_yaml:settings = load(settings_yaml)+if settings.get('server', {}).get('debug'):+ logging.basicConfig(level=logging.DEBUG)+else:+ logging.basicConfig(level=logging.WARNING)++logger = logging.getLogger('searx')+# load https rules only if https rewrite is enabledif settings.get('server', {}).get('https_rewrite'):# loade https rules+ from searx.https_rewrite import load_https_rulesload_https_rules(https_rewrite_path)++logger.info('Initialisation done')