stumpless 2.2.0
Loading...
Searching...
No Matches
log.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: Apache-2.0 */
2
3/*
4 * Copyright 2018-2024 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
23#ifndef __STUMPLESS_LOG_H
24# define __STUMPLESS_LOG_H
25
26# include <stdarg.h>
27# include <stumpless/config.h>
28
29# ifdef __cplusplus
30extern "C" {
31# endif
32
77int stump( const char *message, ... );
78
114int stump_str( const char *message );
115
172int
173stump_trace( const char *file,
174 int line,
175 const char *func,
176 const char *message,
177 ... );
178
224int
225stump_trace_str( const char *file,
226 int line,
227 const char *func,
228 const char *message );
229
278void
279stumplog( int priority, const char *message, ... );
280
316int
318
358void
359stumplog_str( int priority, const char *message );
360
420void
421stumplog_trace( int priority,
422 const char *file,
423 int line,
424 const char *func,
425 const char *message,
426 ... );
427
478void
479stumplog_trace_str( int priority,
480 const char *file,
481 int line,
482 const char *func,
483 const char *message );
484
524int
525vstump( const char *message, va_list subs );
526
576int
577vstump_trace( const char *file,
578 int line,
579 const char *func,
580 const char *message,
581 va_list subs );
582
624void
625vstumplog( int priority, const char *message, va_list subs );
626
680void
681vstumplog_trace( int priority,
682 const char *file,
683 int line,
684 const char *func,
685 const char *message,
686 va_list subs );
687
688# ifdef __cplusplus
689} /* extern "C" */
690# endif
691
692#endif /* __STUMPLESS_LOG_H */
#define STUMPLESS_PUBLIC_FUNCTION
Marks functions that are provided for use by the library.
Definition config.h:31
STUMPLESS_PUBLIC_FUNCTION void vstumplog_trace(int priority, const char *file, int line, const char *func, const char *message, va_list subs)
Logs a message to the default target with the given priority, along with the file,...
STUMPLESS_PUBLIC_FUNCTION int vstump_trace(const char *file, int line, const char *func, const char *message, va_list subs)
Logs a message to the default target, along with the file, line, and function information specified i...
STUMPLESS_PUBLIC_FUNCTION int stump(const char *message,...)
Logs a message to the default target.
STUMPLESS_PUBLIC_FUNCTION void vstumplog(int priority, const char *message, va_list subs)
Logs a message to the default target with the given priority.
STUMPLESS_PUBLIC_FUNCTION int stump_trace_str(const char *file, int line, const char *func, const char *message)
Logs a message to the default target, along with the file, line, and function information specified i...
STUMPLESS_PUBLIC_FUNCTION void stumplog_str(int priority, const char *message)
Logs a message to the current target with the given priority.
STUMPLESS_PUBLIC_FUNCTION int stump_trace(const char *file, int line, const char *func, const char *message,...)
Logs a message to the default target, along with the file, line, and function information specified i...
STUMPLESS_PUBLIC_FUNCTION void stumplog_trace_str(int priority, const char *file, int line, const char *func, const char *message)
Logs a message to the default target with the given priority, along with the file,...
STUMPLESS_PUBLIC_FUNCTION int stump_str(const char *message)
Logs a message to the default target.
STUMPLESS_PUBLIC_FUNCTION void stumplog(int priority, const char *message,...)
Logs a message to the current target with the given priority.
STUMPLESS_PUBLIC_FUNCTION int vstump(const char *message, va_list subs)
Logs a message to the default target.
STUMPLESS_PUBLIC_FUNCTION int stumplog_set_mask(int mask)
Sets the log mask of the current target.
STUMPLESS_PUBLIC_FUNCTION void stumplog_trace(int priority, const char *file, int line, const char *func, const char *message,...)
Logs a message to the default target with the given priority, along with the file,...