diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2018-04-30 11:05:14 +0200 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2018-04-30 11:05:14 +0200 |
| commit | cd23e5f1b2630ee07567bd361373ba725774061b (patch) | |
| tree | b33a6e3ad9619a1e9870cfddc316a9bb91e2a36c /docs/source/development/reference | |
| parent | f8aacfb513c9380c4df3b2dda124c0b1da7aaa3c (diff) | |
| parent | d0fefa4104d9b655d59e400cda616f0b4d407071 (diff) | |
| download | PROJ-cd23e5f1b2630ee07567bd361373ba725774061b.tar.gz PROJ-cd23e5f1b2630ee07567bd361373ba725774061b.zip | |
Merge remote-tracking branch 'osgeo/master' into doc-improvements
Diffstat (limited to 'docs/source/development/reference')
| -rw-r--r-- | docs/source/development/reference/datatypes.rst | 50 | ||||
| -rw-r--r-- | docs/source/development/reference/functions.rst | 28 |
2 files changed, 78 insertions, 0 deletions
diff --git a/docs/source/development/reference/datatypes.rst b/docs/source/development/reference/datatypes.rst index 8966923a..2a335a15 100644 --- a/docs/source/development/reference/datatypes.rst +++ b/docs/source/development/reference/datatypes.rst @@ -744,3 +744,53 @@ Info structures .. c:member:: char PJ_INIT_INFO.lastupdate Date of last update of the init-file. + + +Logging +------------------------------------------------------------------------------- + +.. c:type:: PJ_LOG_LEVEL + + Enum of logging levels in PROJ. Used to set the logging level in PROJ. + Usually using :c:func:`proj_log_level`. + + .. c:member:: PJ_LOG_NONE + + Don't log anything. + + .. c:member:: PJ_LOG_ERROR + + Log only errors. + + .. c:member:: PJ_LOG_DEBUG + + Log errors and additional debug information. + + .. c:member:: PJ_LOG_TRACE + + Highest logging level. Log everything including very detailed debug + information. + + .. c:member:: PJ_LOG_TELL + + Special logging level that when used in :c:func:`proj_log_level` + will return the current logging level set in PROJ. + + .. versionadded:: 5.1.0 + +.. c:type:: PJ_LOG_FUNC + + Function prototype for the logging function used by PROJ. + Defined as + + .. code-block:: C + + typedef void (*PJ_LOG_FUNCTION)(void *, int, const char *); + + where the :c:type:`void` pointer references a data structure used by the + calling application, the :c:type:`int` is used to set the logging level + and the :c:type:`const char` pointer is the string that will be logged + by the function. + + + .. versionadded:: 5.1.0 diff --git a/docs/source/development/reference/functions.rst b/docs/source/development/reference/functions.rst index 3d141ae2..52f801e5 100644 --- a/docs/source/development/reference/functions.rst +++ b/docs/source/development/reference/functions.rst @@ -276,6 +276,34 @@ Change the error-state of :c:data:`P` to `err`. .. note:: Available from version 5.1.0. + +Logging +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. c:function:: PJ_LOG_LEVEL proj_log_level (PJ_CONTEXT *ctx, PJ_LOG_LEVEL level) + + Get and set logging level for a given context. Changes the log level to + :c:data:`level` and returns the previous logging level. If called with + :c:data:`level` set to :c:type:`PJ_LOG_TELL` the function returns the current + logging level without changing it. + + :param PJ_CONTEXT* ctx: Threading context. + :param PJ_LOG_LEVEL level: New logging level. + + :returns: :c:type:`PJ_LOG_LEVEL` + + .. versionadded:: 5.1.0 + +.. c:function:: void proj_log_func (PJ_CONTEXT *ctx, void *app_data, PJ_LOG_FUNCTION logf) + + Override the internal log function of PROJ. + + :param PJ_CONTEXT* ctx: Threading context. + :param void* app_data: Pointer to data structure used by the calling application. + :param PJ_LOG_FUNCTION logf: Log function that overrides the PROJ log function. + + .. versionadded:: 5.1.0 + Info functions ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
