Commit 52b568ae authored by Daniel Salzman's avatar Daniel Salzman

log: add comment about LOG_SOURCE_ANY usage

parent a1a8f7f8
/* Copyright (C) 2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
/* Copyright (C) 2017 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -292,7 +292,7 @@ static int log_msg_add(char **write, size_t *capacity, const char *fmt, ...)
static void log_msg_text(int level, log_source_t src, const char *zone,
const char *fmt, va_list args)
{
if (!log_isopen()) {
if (!log_isopen() || src == LOG_SOURCE_ANY) {
return;
}
......
......@@ -103,8 +103,10 @@ void log_levels_add(log_target_t target, log_source_t src, int levels);
*
* Function follows printf() format.
*
* \note LOG_SOURCE_ANY is not a valid value for the src parameter.
*
* \param priority Message priority.
* \param src Message source.
* \param src Message source (LOG_SOURCE_SERVER...LOG_SOURCE_ZONE).
* \param fmt Content of the logged message.
*/
void log_fmt(int priority, log_source_t src, const char *fmt, ...)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment