diff --git a/templates/gunicorn-instance.cfg.erb b/templates/gunicorn-instance.cfg.erb index 1344a4c..2ad7687 100644 --- a/templates/gunicorn-instance.cfg.erb +++ b/templates/gunicorn-instance.cfg.erb @@ -1,37 +1,37 @@ # Gunicorn instance configuration. # Managed by puppet (class gunicorn::instance <%= @name %>); changes will be lost import traceback import gunicorn.glogging class Logger(gunicorn.glogging.Logger): log_only_errors = <%= @log_only_errors_str %> def access(self, resp, req, environ, request_time): """ See http://httpd.apache.org/docs/2.0/logs.html#combined for format details """ if not (self.cfg.accesslog or self.cfg.logconfig or self.cfg.syslog): return # wrap atoms: # - make sure atoms will be test case insensitively # - if atom doesn't exist replace it by '-' atoms = self.atoms(resp, req, environ, request_time) safe_atoms = self.atoms_wrapper_class(atoms) try: if self.log_only_errors and str(atoms['s']) == '200': return self.access_log.info(self.cfg.access_log_format % safe_atoms, extra={'swh_atoms': atoms}) except: self.exception('Failed processing access log entry') logger_class = Logger -logconfig = 'logconfig.ini' +logconfig = '/etc/gunicorn/logconfig.ini' # custom settings <% @settings.each do |key, value| -%> <%= key %> = <%= value.to_json %> <% end -%>