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
@@ -98,45 +105,6 @@ the :ref:`allocation API <allocation API>` as a first argument. There is also a
98
105
retrieve a memory pool from an existing memory pointer that points to a memory
99
106
previously allocated by UMF.
100
107
101
-
Logging
102
-
---------------------
103
-
104
-
Logging in UMF is handled by logger. There are several levels of logging: *debug*, *info*, *warning*, and *error*.
105
-
The level of logging determines what messages will be printed, ie. the level set to *warning* means all messages at levels *warning* and *error* will be printed.
106
-
107
-
By default, there is a guarantee that *error* messages are flushed immediately. One can change this behavior to flush on lower-level messages.
108
-
109
-
Loggers redirect messages to *stdout*, *stderr*, or a file
110
-
111
-
By default, only fatal messages are printed. To enable logger you have to set **UMF_LOG** environment variable which have following syntax for setting logger options:
* level - a log level, meaning that only messages from this level and above are printed.
116
-
Possible values, from the lowest level to the highest one: *debug*, *info*, *warning*, *error*, *fatal*
117
-
* flush - a flush level, meaning that messages at this level and above are guaranteed to be flushed immediately,
118
-
possible values are the same as above,
119
-
* output - indicates where messages should be printed.
120
-
Possible values are: *stdout*, *stderr* and *file*,
121
-
when providing a *file* output option, a *<path>* is required
122
-
* timestamp - add a timestamp to log message
123
-
* pid - add thread and process ids to log message
124
-
125
-
.. note::
126
-
For output to file, a path to the file has to be provided after a comma, like in the example above. The path has to exist, file will be created if not existing. Path to the file should be no longer than 255 characters long.
127
-
The output parameter is required, all other logger options are optional. The defaults are set when options are not provided in the environment variable.
128
-
Options have to be separated with `;`, option names and their values with `:`. Additionally, when providing *file* output, the keyword *file* and a path to a file
129
-
have to be separated by `'`.
130
-
131
-
An example of an environment variable for setting up logger with logging level set to *info*, flush level set to *warning*, and output set to
An example of an environment variable for setting up logger with logging level set to *warning* and output set to stdout::
137
-
138
-
UMF_LOGL="level:warning;output:stdout"
139
-
140
108
Inter-Process Communication
141
109
===========================
142
110
@@ -158,5 +126,54 @@ When a client requests an IPC handle for a memory allocated by UMF, UMF does the
158
126
Not every memory provider can and must support IPC operations. It is up to the memory provider implementation to decide if it supports IPC operations.
159
127
If the corresponding memory provider does not support IPC operations, UMF will return an error when a client requests an IPC handle for a memory object allocated by this memory provider.
160
128
129
+
==============
130
+
Fundamentals
131
+
==============
132
+
133
+
The following section provides fundamentals of the project. More detailed information can be found in
134
+
contributing guide and detailed API pages.
135
+
136
+
The contribution guide can be found in the repository, in file: `CONTRIBUTING.md`_.
137
+
138
+
Logging
139
+
============
140
+
141
+
Logging in UMF is handled by logger. There are several levels of logging: *debug*, *info*, *warning*, and *error*.
142
+
The level of logging determines what messages will be printed, ie. the level set to *warning* means all messages at levels *warning* and *error* will be printed.
143
+
144
+
By default, there is a guarantee that *error* messages are flushed immediately. One can change this behavior to flush on lower-level messages.
145
+
146
+
Loggers redirect messages to *stdout*, *stderr*, or a file.
147
+
148
+
By default, only fatal messages are printed. To enable logger you have to set **UMF_LOG** environment variable which have the following syntax for setting logger options::
* level - a log level, meaning that only messages from this level and above are printed. Possible values, from the lowest level to the highest one: *debug*, *info*, *warning*, *error*, *fatal*.
153
+
154
+
* flush - a flush level, meaning that messages at this level and above are guaranteed to be flushed immediately, possible values are the same as above.
155
+
156
+
* output - indicates where messages should be printed. Possible values are: *stdout*, *stderr* and *file*, when providing a *file* output option, a *<path>* is required.
157
+
158
+
* timestamp - add a timestamp to log message.
159
+
160
+
* pid - add thread and process ids to log message.
161
+
162
+
.. note::
163
+
For output to a file, a path to a file has to be provided after a comma, like in the example above. The path has to exist and should be no longer than 255 characters long. The file will be created if not existing.
164
+
The output parameter is required. All other logger options are optional. The defaults are set when options are not provided in the environment variable.
165
+
Options have to be separated with a semicolon (`;`), option names and their values with a colon (`:`). Additionally, when providing *file* output, the keyword *file* and a path to a file
166
+
have to be separated by a comma (`,`).
167
+
168
+
An example of an environment variable for setting up logger with logging level set to *info*, flush level set to *warning*, and output set to
0 commit comments