30 |
30 |
31 from warnings import warn |
31 from warnings import warn |
32 from itertools import chain |
32 from itertools import chain |
33 from time import time, localtime, strftime |
33 from time import time, localtime, strftime |
34 from contextlib import contextmanager |
34 from contextlib import contextmanager |
|
35 from logging import getLogger |
35 |
36 |
36 from six.moves import range, queue |
37 from six.moves import range, queue |
37 |
38 |
38 from logilab.common.decorators import cached, clear_cache |
39 from logilab.common.decorators import cached, clear_cache |
39 from logilab.common.deprecation import deprecated |
40 from logilab.common.deprecation import deprecated |
43 |
44 |
44 from cubicweb import (CW_MIGRATION_MAP, QueryError, |
45 from cubicweb import (CW_MIGRATION_MAP, QueryError, |
45 UnknownEid, AuthenticationError, ExecutionError, |
46 UnknownEid, AuthenticationError, ExecutionError, |
46 BadConnectionId, ValidationError, Unauthorized, |
47 BadConnectionId, ValidationError, Unauthorized, |
47 UniqueTogetherError, onevent, ViolatedConstraint) |
48 UniqueTogetherError, onevent, ViolatedConstraint) |
|
49 from cubicweb import set_log_methods |
48 from cubicweb import cwvreg, schema, server |
50 from cubicweb import cwvreg, schema, server |
49 from cubicweb.server import ShuttingDown, utils, hook, querier, sources |
51 from cubicweb.server import ShuttingDown, utils, hook, querier, sources |
50 from cubicweb.server.session import Session, InternalManager |
52 from cubicweb.server.session import Session, InternalManager |
51 |
53 |
52 |
54 |
1030 |
1032 |
1031 # these are overridden by set_log_methods below |
1033 # these are overridden by set_log_methods below |
1032 # only defining here to prevent pylint from complaining |
1034 # only defining here to prevent pylint from complaining |
1033 info = warning = error = critical = exception = debug = lambda msg, *a, **kw: None |
1035 info = warning = error = critical = exception = debug = lambda msg, *a, **kw: None |
1034 |
1036 |
1035 |
|
1036 from logging import getLogger |
|
1037 from cubicweb import set_log_methods |
|
1038 set_log_methods(Repository, getLogger('cubicweb.repository')) |
1037 set_log_methods(Repository, getLogger('cubicweb.repository')) |