File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
_delphi_utils_python/delphi_utils Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 5
5
6
6
def get_structured_logger (name = __name__ ):
7
7
"""Create a new structlog logger.
8
-
9
- Use the logger returned from this in indicator code using the standard
8
+
9
+ Use the logger returned from this in indicator code using the standard
10
10
wrapper calls, e.g.:
11
11
12
+ logger = get_structured_logger(__name__)
12
13
logger.warning("Error", type="Signal too low").
13
14
14
15
The output will be rendered as JSON which can easily be consumed by logs
15
16
processors.
16
17
17
18
See the structlog documentation for details.
19
+
20
+ Parameters
21
+ ---------
22
+ name: Name to use for logger (included in log lines), __name__ from caller
23
+ is a good choice.
18
24
"""
19
25
# Configure the underlying logging configuration
20
26
logging .basicConfig (
You can’t perform that action at this time.
0 commit comments