Code

parser: Let the TIMESERIES command accept optional data-source names.
[sysdb.git] / src / include / utils / error.h
index 49034eb2544381061583c33d4174e9fb9089e80e..d00ee8c0f980b5abf8590b99f073a3344d0cdb1b 100644 (file)
@@ -62,6 +62,10 @@ enum {
                : ((prio) == SDB_LOG_INFO) ? "INFO" \
                : ((prio) == SDB_LOG_DEBUG) ? "DEBUG" : "UNKNOWN")
 
+#ifndef SDB_DEFAULT_LOGLEVEL
+#      define SDB_DEFAULT_LOGLEVEL SDB_LOG_INFO
+#endif
+
 /*
  * sdb_error_set_logger:
  * Set the logging callback to be used for logging messages. By default (or
@@ -131,6 +135,17 @@ sdb_error_get(void);
 int
 sdb_error_get_prio(void);
 
+/*
+ * sdb_error_parse_priority:
+ * Parse the name of a log priority.
+ *
+ * Returns:
+ *  - the numeric log priority on success
+ *  - a negative value else
+ */
+int
+sdb_error_parse_priority(char *prio);
+
 /*
  * sdb_strerror:
  * This is a wrapper around the system's strerror function which ensures that