Vanilla.PDF  1.5.2
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;
}