nds2-client - Developer 0.16.7
Loading...
Searching...
No Matches
nds_logging.h
Go to the documentation of this file.
1/* -*- tab-width:8 c-basic-offset:4 indent-tabs-mode:nil -*- */
2/* set vi: ts=8:softtabstop=4,shiftwidth=4,expandtab */
3
4#ifndef NDS_LOGGING_H
5#define NDS_LOGGING_H
6
7#ifdef __cplusplus
8extern "C" {
9/* } */
10#endif
11
12#ifndef DLL_EXPORT
13#if defined _WIN32 || defined _WIN64
14#define DLL_EXPORT __declspec( dllexport )
15#else
16#define DLL_EXPORT
17#endif /* WIN32 || WIN64 */
18#endif /* DLL_EXPORT */
19
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
27
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 )
32
33typedef void ( *nds_flush_function_type )( );
34
35typedef void ( *nds_logging_function_type )( const char* Message );
36
37typedef void ( *nds_logging_helper_entry_type )( );
38
40
42
43DLL_EXPORT int nds_logging_check( int Group, int Level );
44
45DLL_EXPORT void nds_logging_enable( int Group );
46
47DLL_EXPORT void nds_logging_disable( int Group );
48
49DLL_EXPORT int nds_logging_debug_level( int Group, int Level );
50
52
53DLL_EXPORT int nds_logging_group_from_string( const char* GroupString );
54
56
57DLL_EXPORT void nds_logging_printf( const char* MessageFormat, ... );
58
59DLL_EXPORT void nds_logging_print_errno( const char* Leader );
60
61#ifdef __cplusplus
62/* { */
63}
64#endif
65
66#endif /* NDS_LOGGING_H */
#define DLL_EXPORT
Definition nds_logging.h:16
DLL_EXPORT int nds_logging_check(int Group, int Level)
Definition daq_logging.c:36
DLL_EXPORT void nds_logging_enable(int Group)
Definition nds_logging.c:102
DLL_EXPORT void nds_function_flush(nds_flush_function_type Func)
Definition nds_logging.c:76
void(* nds_logging_helper_entry_type)()
Definition nds_logging.h:37
DLL_EXPORT int nds_logging_group_from_string(const char *GroupString)
Definition nds_logging.c:143
void(* nds_flush_function_type)()
Definition nds_logging.h:33
DLL_EXPORT void nds_logging_printf(const char *MessageFormat,...)
Definition nds_logging.c:293
DLL_EXPORT void nds_logging_disable(int Group)
Definition nds_logging.c:112
DLL_EXPORT void nds_logging_print_errno(const char *Leader)
Definition nds_logging.c:322
DLL_EXPORT void nds_logging_flush()
Definition nds_logging.c:134
DLL_EXPORT void nds_logging_init()
Definition nds_logging.c:171
DLL_EXPORT int nds_logging_debug_level(int Group, int Level)
Definition nds_logging.c:122
void(* nds_logging_function_type)(const char *Message)
Definition nds_logging.h:35
DLL_EXPORT void nds_function_logging(nds_logging_function_type Func)
Definition nds_logging.c:82