log.h revision e99e38bbdcca3fe5956823bdb3d38544ccf93221
/*-*- Mode: C; c-basic-offset: 8 -*-*/
#ifndef foologhfoo
#define foologhfoo
/***
This file is part of systemd.
Copyright 2010 Lennart Poettering
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <syslog.h>
#include "macro.h"
* KSMG. If KMSG fails, we fall back to CONSOLE */
typedef enum LogTarget{
_LOG_TARGET_INVALID = -1
} LogTarget;
void log_set_max_level(int level);
int log_set_target_from_string(const char *e);
int log_set_max_level_from_string(const char *e);
LogTarget log_get_target(void);
int log_get_max_level(void);
int log_open(void);
void log_close_syslog(void);
void log_close_kmsg(void);
void log_close_console(void);
void log_parse_environment(void);
int log_meta(
int level,
const char*file,
int line,
const char *func,
_noreturn void log_assert(
const char*file,
int line,
const char *func,
LogTarget log_target_from_string(const char *s);
#endif