diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-10-27 00:40:25 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-10-27 13:25:57 +0100 |
commit | 7ccbd1ae843d77275f2c542582a9a80e5e058a70 (patch) | |
tree | be4ca438784d483cce332973b7cc919091eea97c /src/basic/syslog-util.h | |
parent | d21be5ff9177b25064f6e933e91f2c19a7190c19 (diff) |
util-lib: split out syslog-related calls into syslog-util.[ch]
Diffstat (limited to 'src/basic/syslog-util.h')
-rw-r--r-- | src/basic/syslog-util.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/basic/syslog-util.h b/src/basic/syslog-util.h new file mode 100644 index 0000000000..eb79c6dbd8 --- /dev/null +++ b/src/basic/syslog-util.h @@ -0,0 +1,34 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +#pragma once + +/*** + This file is part of systemd. + + Copyright 2010 Lennart Poettering + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with systemd; If not, see <http://www.gnu.org/licenses/>. +***/ + +#include <stdbool.h> + +int log_facility_unshifted_to_string_alloc(int i, char **s); +int log_facility_unshifted_from_string(const char *s); +bool log_facility_unshifted_is_valid(int faciliy); + +int log_level_to_string_alloc(int i, char **s); +int log_level_from_string(const char *s); +bool log_level_is_valid(int level); + +int syslog_parse_priority(const char **p, int *priority, bool with_facility); |