This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +62
-5
lines changed Expand file tree Collapse file tree 4 files changed +62
-5
lines changed Original file line number Diff line number Diff line change
1
+ Move logging code out of `synapse.util` and into `synapse.logging`.
Original file line number Diff line number Diff line change 21
21
22
22
from twisted .internet import defer , task
23
23
24
- from synapse .logging import context , formatter
24
+ from synapse .logging import context
25
25
26
26
logger = logging .getLogger (__name__ )
27
27
28
- # Compatibility alias, for existing logconfigs.
29
- logcontext = context
30
- logformatter = formatter
31
-
32
28
33
29
def unwrapFirstError (failure ):
34
30
# defer.gatherResults and DeferredLists wrap failures.
Original file line number Diff line number Diff line change
1
+ # Copyright 2019 The Matrix.org Foundation C.I.C.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """
16
+ Backwards compatibility re-exports of ``synapse.logging.context`` functionality.
17
+ """
18
+
19
+ from synapse .logging .context import (
20
+ LoggingContext ,
21
+ LoggingContextFilter ,
22
+ PreserveLoggingContext ,
23
+ defer_to_thread ,
24
+ make_deferred_yieldable ,
25
+ nested_logging_context ,
26
+ preserve_fn ,
27
+ run_in_background ,
28
+ )
29
+
30
+ __all__ = [
31
+ "defer_to_thread" ,
32
+ "LoggingContext" ,
33
+ "LoggingContextFilter" ,
34
+ "make_deferred_yieldable" ,
35
+ "nested_logging_context" ,
36
+ "preserve_fn" ,
37
+ "PreserveLoggingContext" ,
38
+ "run_in_background" ,
39
+ ]
Original file line number Diff line number Diff line change
1
+ # Copyright 2019 The Matrix.org Foundation C.I.C.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """
16
+ Backwards compatibility re-exports of ``synapse.logging.formatter`` functionality.
17
+ """
18
+
19
+ from synapse .logging .formatter import LogFormatter
20
+
21
+ __all__ = ["LogFormatter" ]
You can’t perform that action at this time.
0 commit comments