13 #if defined _WIN32 || defined _WIN64
14 #define DLL_EXPORT __declspec( dllexport )
20 #define NDS_LOG_BAD_GROUP -1
21 #define NDS_LOG_GROUP_CONNECTION 0
22 #define NDS_LOG_GROUP_VERBOSE_ERRORS 1
23 #define NDS_LOG_GROUP_TRACE_ENTRY_EXIT 2
24 #define NDS_LOG_GROUP_STATUS_UPDATE 3
25 #define NDS_LOG_GROUP_USER 4
26 #define NDS_LOG_GROUP_SIZE_MAX 5
28 #define NDS_LOGGING_HELPER_ENTRY nds_logging_helper_init
29 #define STRING_IT( x ) #x
30 #define XSTRING_IT( x ) STRING_IT( x )
31 #define NDS_LOGGING_HELPER_ENTRY_STRING XSTRING_IT( NDS_LOGGING_HELPER_ENTRY )
33 typedef void ( *nds_flush_function_type )( );
35 typedef void ( *nds_logging_function_type )(
const char* Message );
37 typedef void ( *nds_logging_helper_entry_type )( );
39 DLL_EXPORT
void nds_function_flush( nds_flush_function_type Func );
41 DLL_EXPORT
void nds_function_logging( nds_logging_function_type Func );
43 DLL_EXPORT
int nds_logging_check(
int Group,
int Level );
45 DLL_EXPORT
void nds_logging_enable(
int Group );
47 DLL_EXPORT
void nds_logging_disable(
int Group );
49 DLL_EXPORT
int nds_logging_debug_level(
int Group,
int Level );
51 DLL_EXPORT
void nds_logging_flush( );
53 DLL_EXPORT
int nds_logging_group_from_string(
const char* GroupString );
55 DLL_EXPORT
void nds_logging_init( );
57 DLL_EXPORT
void nds_logging_printf(
const char* MessageFormat, ... );
59 DLL_EXPORT
void nds_logging_print_errno(
const char* Leader );