2 * kmod - log infrastructure
4 * Copyright (C) 2012-2013 ProFUSION embedded systems
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
27 void log_open(bool use_syslog);
29 void log_printf(int prio, const char *fmt, ...) _printf_format_(2, 3);
30 #define CRIT(...) log_printf(LOG_CRIT, __VA_ARGS__)
31 #define ERR(...) log_printf(LOG_ERR, __VA_ARGS__)
32 #define WRN(...) log_printf(LOG_WARNING, __VA_ARGS__)
33 #define INF(...) log_printf(LOG_INFO, __VA_ARGS__)
34 #define DBG(...) log_printf(LOG_DEBUG, __VA_ARGS__)
37 void log_setup_kmod_log(struct kmod_ctx *ctx, int priority);