summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ac07692)
raw | patch | inline | side by side (parent: ac07692)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 6 Feb 2014 19:17:09 +0000 (20:17 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 6 Feb 2014 19:17:09 +0000 (20:17 +0100) |
Later, this should be configurable by the client at runtime.
src/frontend/connection.c | patch | blob | history |
index 4ba12dcdd568cf0449c45de60b3984607e5ce17d..b48de2c893ccbc9d9c65de335fecbb66c3421733 100644 (file)
* Send a log message originating from the current thread to the client.
*/
static int
-connection_log(int __attribute__((unused)) prio, const char *msg,
+connection_log(int prio, const char *msg,
sdb_object_t __attribute__((unused)) *user_data)
{
sdb_conn_t *conn;
if ((! conn) || (! conn->username))
return 0;
+ /* XXX: make the log-level configurable by the client at runtime */
+ if (prio >= SDB_LOG_DEBUG)
+ return 0;
+
/* TODO: Use CONNECTION_LOG_<prio>? */
if (sdb_connection_send(conn, CONNECTION_LOG,
(uint32_t)strlen(msg), msg) < 0)