You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added new output sink to the logger which is a user configurable callback function.
Configurable through two new entry points with adapter implementations: urAdapterSetLoggerCallback() and urAdapterSetLoggerCallbackLevel().
Moved logger::level enum to the spec, named ur_logger_level_t.
Added new unit test suite for these entry points.
Copy file name to clipboardExpand all lines: scripts/core/INTRO.rst
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -202,9 +202,9 @@ By default, no messages are printed.
202
202
203
203
By default, there is a guarantee that *error* messages are flushed immediately. One can change this behavior to flush on lower-level messages.
204
204
205
-
Loggers redirect messages to *stdout*, *stderr*, or a file (default: *stderr*).
205
+
Loggers redirect messages to *stdout*, *stderr*, a file or a user configurable callback function (default: *stderr*).
206
206
207
-
All of these logging options can be set with **UR_LOG_LOADER** and **UR_LOG_NULL** environment variables described in the **Environment Variables** section below.
207
+
All of these logging options (except the callback) can be set with **UR_LOG_LOADER** and **UR_LOG_NULL** environment variables described in the **Environment Variables** section below.
208
208
Both of these environment variables have the same syntax for setting logger options:
@@ -232,6 +232,10 @@ An example of an environment variable for setting up the null adapter library wi
232
232
233
233
UR_LOG_NULL="level:warning;output:stdout"
234
234
235
+
Logging callback
236
+
^^^^^^^^^^^^^^^^^^^^^
237
+
An API is available to configure the logging callback function :ref:`urSetLoggerCallback`. Additionally, the logging level can be set using :ref:`urSetLoggerCallbackLevel`.
238
+
235
239
Adapter Discovery
236
240
---------------------
237
241
UR is capable of discovering adapter libraries in the following ways in the listed order:
0 commit comments