Skip to content

Commit 22bf73b

Browse files
Add examples to pydoc
1 parent 4694f8e commit 22bf73b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

_delphi_utils_python/delphi_utils/logger.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,22 @@
55

66
def get_structured_logger(name=__name__):
77
"""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
1010
wrapper calls, e.g.:
1111
12+
logger = get_structured_logger(__name__)
1213
logger.warning("Error", type="Signal too low").
1314
1415
The output will be rendered as JSON which can easily be consumed by logs
1516
processors.
1617
1718
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.
1824
"""
1925
# Configure the underlying logging configuration
2026
logging.basicConfig(

0 commit comments

Comments
 (0)