diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2018-04-14 08:34:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-14 08:34:29 +0200 |
| commit | ee22447de347c78944af849b10e0c9fd10184c28 (patch) | |
| tree | 810fb2aec0f868825a504284feee8de57ca080fc /src/proj.h | |
| parent | 4378963e0046739890ef0e7da8641b5880db3beb (diff) | |
| parent | 97a9bef9b6d78bcfc4cad49004aadc1c181369d5 (diff) | |
| download | PROJ-ee22447de347c78944af849b10e0c9fd10184c28.tar.gz PROJ-ee22447de347c78944af849b10e0c9fd10184c28.zip | |
Merge pull request #924 from kbevers/logging_with_new_api
Logging with new api
Diffstat (limited to 'src/proj.h')
| -rw-r--r-- | src/proj.h | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -268,6 +268,17 @@ struct PJ_INIT_INFO { char lastupdate[16]; /* Date of last update in YYYY-MM-DD format */ }; +typedef enum PJ_LOG_LEVEL { + PJ_LOG_NONE = 0, + PJ_LOG_ERROR = 1, + PJ_LOG_DEBUG = 2, + PJ_LOG_TRACE = 3, + PJ_LOG_TELL = 4, + PJ_LOG_DEBUG_MAJOR = 2, /* for proj_api.h compatibility */ + PJ_LOG_DEBUG_MINOR = 3 /* for proj_api.h compatibility */ +} PJ_LOG_LEVEL; + +typedef void (*PJ_LOG_FUNCTION)(void *, int, const char *); /* The context type - properly namespaced synonym for projCtx */ @@ -342,7 +353,6 @@ double proj_xyz_dist (PJ_COORD a, PJ_COORD b); PJ_COORD proj_geod (const PJ *P, PJ_COORD a, PJ_COORD b); - /* Set or read error level */ int proj_context_errno (PJ_CONTEXT *ctx); int proj_errno (const PJ *P); @@ -351,6 +361,9 @@ int proj_errno_reset (const PJ *P); int proj_errno_restore (const PJ *P, int err); const char* proj_errno_string (int err); +PJ_LOG_LEVEL proj_log_level (PJ_CONTEXT *ctx, PJ_LOG_LEVEL level); +void proj_log_func (PJ_CONTEXT *ctx, void *app_data, PJ_LOG_FUNCTION logf); + /* Scaling and angular distortion factors */ PJ_FACTORS proj_factors(PJ *P, PJ_COORD lp); |
