diff options
author | David Robillard <d@drobilla.net> | 2018-11-29 21:08:25 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-11-29 21:08:25 +0100 |
commit | 7d663f4cd217b91809c6b279873520192383b614 (patch) | |
tree | e612e9344dc8adabbe414201316689ec7c503c0b /serd | |
parent | af475a0c5ee0f61c3046caa0d9b563c07a14d995 (diff) | |
download | serd-7d663f4cd217b91809c6b279873520192383b614.tar.gz serd-7d663f4cd217b91809c6b279873520192383b614.tar.bz2 serd-7d663f4cd217b91809c6b279873520192383b614.zip |
WIP: Use SerdWorld log in validator
Diffstat (limited to 'serd')
-rw-r--r-- | serd/serd.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/serd/serd.h b/serd/serd.h index 8aa22f7a..4f8d40c5 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -159,7 +159,8 @@ typedef enum { SERD_ERR_ID_CLASH, /**< Encountered clashing blank node IDs */ SERD_ERR_BAD_CURIE, /**< Invalid CURIE (e.g. prefix does not exist) */ SERD_ERR_INTERNAL, /**< Unexpected internal error (should not happen) */ - SERD_ERR_OVERFLOW /**< Stack overflow */ + SERD_ERR_OVERFLOW, /**< Stack overflow */ + SERD_ERR_INVALID /**< Invalid data */ } SerdStatus; /** @@ -349,10 +350,20 @@ typedef struct { } SerdBuffer; /** + Log message level. +*/ +typedef enum { + SERD_LOG_LEVEL_INFO = 0, /**< Normal informative message */ + SERD_LOG_LEVEL_WARNING = 1, /**< Warning */ + SERD_LOG_LEVEL_ERROR = 2, /**< Error */ +} SerdLogLevel; + +/** A message description. */ typedef struct { SerdStatus status; /**< Status code */ + SerdLogLevel level; /**< Log level */ const SerdCursor* cursor; /**< Origin of message, or NULL */ const char* fmt; /**< Message format string (printf style) */ va_list* args; /**< Arguments for fmt */ |