stumpless  2.1.0
journald.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0 */
2 
3 /*
4  * Copyright 2021-2022 Joel E. Anderson
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
45 #ifndef __STUMPLESS_TARGET_JOURNALD_H
46 # define __STUMPLESS_TARGET_JOURNALD_H
47 
48 # include <stddef.h>
49 # include <stumpless/config.h>
50 # include <stumpless/entry.h>
51 # include <stumpless/target.h>
52 
53 # ifdef __cplusplus
54 extern "C" {
55 # endif
56 
77 void
79 
117 size_t
119  size_t element_index,
120  char *destination,
121  size_t size );
122 
165 size_t
167  size_t element_index,
168  size_t param_index,
169  char *destination,
170  size_t size );
171 
196 struct stumpless_target *
198 
199 # ifdef __cplusplus
200 } /* extern "C" */
201 # endif
202 #endif /* __STUMPLESS_TARGET_JOURNALD_H */
stumpless_flatten_param_name
size_t stumpless_flatten_param_name(const struct stumpless_entry *entry, size_t element_index, size_t param_index, char *destination, size_t size)
Creates a name for the param by combining the element and param name.
stumpless_target::name
char * name
The name of this target.
Definition: target.h:153
stumpless_target
A target that log entries can be sent to.
Definition: target.h:136
entry.h
stumpless_flatten_element_name
size_t stumpless_flatten_element_name(const struct stumpless_entry *entry, size_t element_index, char *destination, size_t size)
Creates a journald-compliant name for the element.
target.h
STUMPLESS_PUBLIC_FUNCTION
#define STUMPLESS_PUBLIC_FUNCTION
Marks functions that are provided for use by the library.
Definition: config.h:31
config.h
stumpless_close_journald_target
void stumpless_close_journald_target(const struct stumpless_target *target)
Closes a journald target.
stumpless_entry
A log entry.
Definition: entry.h:63
stumpless_open_journald_target
struct stumpless_target * stumpless_open_journald_target(const char *name)
Opens a journald target.