stumpless  2.1.0
log.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0 */
2 
3 /*
4  * Copyright 2018-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 
23 #ifndef __STUMPLESS_LOG_H
24 # define __STUMPLESS_LOG_H
25 
26 # include <stdarg.h>
27 # include <stumpless/config.h>
28 
29 # ifdef __cplusplus
30 extern "C" {
31 # endif
32 
75 int stump( const char *message, ... );
76 
110 int stump_str( const char *message );
111 
166 int
167 stump_trace( const char *file,
168  int line,
169  const char *func,
170  const char *message,
171  ... );
172 
216 int
217 stump_trace_str( const char *file,
218  int line,
219  const char *func,
220  const char *message );
221 
268 void
269 stumplog( int priority, const char *message, ... );
270 
306 int
307 stumplog_set_mask( int mask );
308 
346 void
347 stumplog_str( int priority, const char *message );
348 
406 void
407 stumplog_trace( int priority,
408  const char *file,
409  int line,
410  const char *func,
411  const char *message,
412  ... );
413 
462 void
463 stumplog_trace_str( int priority,
464  const char *file,
465  int line,
466  const char *func,
467  const char *message );
468 
506 int
507 vstump( const char *message, va_list subs );
508 
556 int
557 vstump_trace( const char *file,
558  int line,
559  const char *func,
560  const char *message,
561  va_list subs );
562 
602 void
603 vstumplog( int priority, const char *message, va_list subs );
604 
656 void
657 vstumplog_trace( int priority,
658  const char *file,
659  int line,
660  const char *func,
661  const char *message,
662  va_list subs );
663 
664 # ifdef __cplusplus
665 } /* extern "C" */
666 # endif
667 
668 #endif /* __STUMPLESS_LOG_H */
stump_trace_str
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...
stumplog
void stumplog(int priority, const char *message,...)
Logs a message to the current target with the given priority.
stump_trace
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...
vstump
int vstump(const char *message, va_list subs)
Logs a message to the default target.
stump_str
int stump_str(const char *message)
Logs a message to the default target.
stumplog_trace_str
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,...
stumplog_trace
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,...
stumplog_set_mask
int stumplog_set_mask(int mask)
Sets the log mask of the current target.
vstumplog
void vstumplog(int priority, const char *message, va_list subs)
Logs a message to the default target with the given priority.
vstumplog_trace
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_error::message
const char * message
specific details of the failure
Definition: error.h:117
STUMPLESS_PUBLIC_FUNCTION
#define STUMPLESS_PUBLIC_FUNCTION
Marks functions that are provided for use by the library.
Definition: config.h:31
config.h
vstump_trace
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...
stumplog_str
void stumplog_str(int priority, const char *message)
Logs a message to the current target with the given priority.
stump
int stump(const char *message,...)
Logs a message to the default target.