turn default logging threshold to warning (we usually want them), and log 'no schema for eid' pb using warning instead of error, so we see them in logs but not during migration stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 18 Feb 2010 10:54:50 +0100
branchstable
changeset 4624 1b46d5ece0d5
parent 4623 994c70fe5006
child 4625 d8c3a50a8ee7
turn default logging threshold to warning (we usually want them), and log 'no schema for eid' pb using warning instead of error, so we see them in logs but not during migration
cwconfig.py
hooks/syncschema.py
--- a/cwconfig.py	Thu Feb 18 09:26:04 2010 +0100
+++ b/cwconfig.py	Thu Feb 18 10:54:50 2010 +0100
@@ -236,7 +236,7 @@
     options = (
        ('log-threshold',
          {'type' : 'string', # XXX use a dedicated type?
-          'default': 'ERROR',
+          'default': 'WARNING',
           'help': 'server\'s log level',
           'group': 'main', 'inputlevel': 1,
           }),
--- a/hooks/syncschema.py	Thu Feb 18 09:26:04 2010 +0100
+++ b/hooks/syncschema.py	Thu Feb 18 10:54:50 2010 +0100
@@ -690,7 +690,7 @@
             erschema = self.session.vreg.schema.schema_by_eid(self.eid)
         except KeyError:
             # duh, schema not found, log error and skip operation
-            self.error('no schema for %s', self.eid)
+            self.warning('no schema for %s', self.eid)
             return
         perms = list(erschema.action_permissions(self.action))
         if hasattr(self, 'group_eid'):
@@ -717,7 +717,7 @@
             erschema = self.session.vreg.schema.schema_by_eid(self.eid)
         except KeyError:
             # duh, schema not found, log error and skip operation
-            self.error('no schema for %s', self.eid)
+            self.warning('no schema for %s', self.eid)
             return
         if isinstance(erschema, RelationSchema): # XXX 3.6 migration
             return