Skip to content

Commit bab3030

Browse files
committed
Minor inspect related doc tweak
1 parent f741056 commit bab3030

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

docs/udf.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,10 @@ An example code can be found `here <https://github.com/Open-EO/openeo-python-cli
470470

471471

472472

473-
Logging from the UDFs
474-
==============================
473+
.. _udf_logging_with_inspect:
474+
475+
Logging from a UDF
476+
=====================
475477

476478
In some cases, you may want to log information from your user defined function,
477479
for instance to provide debug information or to log warnings. You can use the :py:class:`~openeo.udf.debug.inspect`

openeo/udf/debug.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ def inspect(data=None, message: str = "", code: str = "User", level: str = "info
1616
Note that it is up to the back-end implementation to properly capture this logging
1717
and include it in the batch job logs.
1818
19-
.. versionadded:: 0.10.1
20-
2119
:param data: data to log
2220
:param message: message to send in addition to the data
2321
:param code: A label to help identify one or more log entries
2422
:param level: The severity level of this message. Allowed values: "error", "warning", "info", "debug"
23+
24+
.. versionadded:: 0.10.1
25+
26+
.. seealso:: :ref:`udf_logging_with_inspect`
2527
"""
2628
extra = {"data": data, "code": code}
2729
kwargs = {"stacklevel": 2} if sys.version_info >= (3, 8) else {}

0 commit comments

Comments
 (0)