Vanilla.PDF  2.0.0
Cross-platform toolkit for creating and modifying PDF documents
c_logging.h
Go to the documentation of this file.
1#ifndef _C_LOGGING_H
2#define _C_LOGGING_H
3
7
8#ifdef __cplusplus
9extern "C"
10{
11#endif
12
76
85 typedef void(CALLING_CONVENTION *Sink_Log_Function)(void* user_data, LoggingSeverity level, string_type payload, size_type length);
86
90 typedef void(CALLING_CONVENTION *Sink_Flush_Function)(void* user_data);
91
95 VANILLAPDF_API error_type CALLING_CONVENTION Logging_SetCallbackLogger(
96 Sink_Log_Function sink_callback,
97 Sink_Flush_Function sink_flush_callback,
98 void* user_data);
99
103 VANILLAPDF_API error_type CALLING_CONVENTION Logging_SetRotatingFileLogger(
104 string_type filename,
105 integer_type max_file_size,
106 integer_type max_files);
107
180 VANILLAPDF_API error_type CALLING_CONVENTION Logging_SetPattern(string_type pattern);
181
182
186 VANILLAPDF_API error_type CALLING_CONVENTION Logging_GetSeverity(LoggingSeverity* level);
187
191 VANILLAPDF_API error_type CALLING_CONVENTION Logging_SetSeverity(LoggingSeverity level);
192
196 VANILLAPDF_API error_type CALLING_CONVENTION Logging_Shutdown();
197
200#ifdef __cplusplus
201};
202#endif
203
204#endif /* _C_LOGGING_H */
This file contains macro declarations for importing and exporting symbols from library boundaries.
This file contains all type forward declarations returned by the library API.
LoggingSeverity
Available severity settings.
Definition c_logging.h:35
@ LoggingSeverity_Trace
Most verbose setting includes all available informations.
Definition c_logging.h:41
@ LoggingSeverity_Critical
Include only fatal problems, that disallow program to continue operating and will be shut down.
Definition c_logging.h:69
@ LoggingSeverity_Info
Include detailed, but much less verbose output.
Definition c_logging.h:52
@ LoggingSeverity_Warning
Include only potentially dangerous information.
Definition c_logging.h:57
@ LoggingSeverity_Off
Logging is turned off entirely.
Definition c_logging.h:74
@ LoggingSeverity_Error
Include only program and input errors.
Definition c_logging.h:62
@ LoggingSeverity_Debug
Very detailed level with most of the necessary information required during debugging.
Definition c_logging.h:47
This file contains types and constants used as parameters or return values.
error_type CALLING_CONVENTION Logging_SetSeverity(LoggingSeverity level)
Set new logging severity.
error_type CALLING_CONVENTION Logging_SetCallbackLogger(Sink_Log_Function sink_callback, Sink_Flush_Function sink_flush_callback, void *user_data)
Set a logger, that will invoke sink_callback and sink_flush_callback passing user_data.
error_type CALLING_CONVENTION Logging_Shutdown()
Gracefully terminate the entire logging ecosystem.
error_type CALLING_CONVENTION Logging_SetRotatingFileLogger(string_type filename, integer_type max_file_size, integer_type max_files)
Set a logger using rotating file sink based on size.
error_type CALLING_CONVENTION Logging_GetSeverity(LoggingSeverity *level)
Get actual logging severity.
error_type CALLING_CONVENTION Logging_SetPattern(string_type pattern)
Set logging pattern to be used for each logging entry.
uint32_t error_type
This is return value type of all API functions.
Definition c_types.h:25
int32_t integer_type
32-bit signed integer
Definition c_types.h:51
uint32_t size_type
Size type defined in standard library.
Definition c_types.h:62
const char * string_type
C-Style string.
Definition c_types.h:82