Vanilla.PDF  1.6.0
Cross-platform toolkit for creating and modifying PDF documents
Test logging
error_type process_logging() {
boolean_type logging_enabled = VANILLAPDF_RV_TRUE;
LoggingSeverity logging_severity;
RETURN_ERROR_IF_NOT_SUCCESS(Logging_IsEnabled(&logging_enabled));
if (logging_enabled != VANILLAPDF_RV_FALSE) {
return VANILLAPDF_TEST_ERROR_LOGGING_ENABLED;
}
RETURN_ERROR_IF_NOT_SUCCESS(Logging_Enable());
RETURN_ERROR_IF_NOT_SUCCESS(Logging_IsEnabled(&logging_enabled));
if (logging_enabled != VANILLAPDF_RV_TRUE) {
return VANILLAPDF_TEST_ERROR_LOGGING_ENABLED;
}
RETURN_ERROR_IF_NOT_SUCCESS(Logging_Disable());
RETURN_ERROR_IF_NOT_SUCCESS(Logging_IsEnabled(&logging_enabled));
if (logging_enabled != VANILLAPDF_RV_FALSE) {
return VANILLAPDF_TEST_ERROR_LOGGING_ENABLED;
}
RETURN_ERROR_IF_NOT_SUCCESS(Logging_GetSeverity(&logging_severity));
RETURN_ERROR_IF_NOT_SUCCESS(Logging_SetSeverity(logging_severity));
return VANILLAPDF_TEST_ERROR_SUCCESS;
}
LoggingSeverity
Available severity settings.
Definition: c_logging.h:39
error_type CALLING_CONVENTION Logging_SetSeverity(LoggingSeverity level)
Set new logging severity.
error_type CALLING_CONVENTION Logging_Enable(void)
Enable logging for current library instance.
error_type CALLING_CONVENTION Logging_IsEnabled(boolean_type *result)
Determine if logging is enabled in current library instance.
error_type CALLING_CONVENTION Logging_GetSeverity(LoggingSeverity *level)
Get actual logging severity.
error_type CALLING_CONVENTION Logging_Disable(void)
Disable logging for current library instance.
const boolean_type VANILLAPDF_RV_TRUE
Represents the boolean true value.
const boolean_type VANILLAPDF_RV_FALSE
Represents the boolean false value.
uint32_t error_type
This is return value type of all API functions.
Definition: c_types.h:25
int8_t boolean_type
Boolean type supported in C.
Definition: c_types.h:31