Add debug and log functions to ANSLIB
This commit is contained in:
@@ -32,6 +32,15 @@
|
||||
// filesystem check runs at most once per ~2 s.
|
||||
extern "C" ANSLICENSE_API int ANSCENTER_IsDebugViewEnabled(void);
|
||||
|
||||
// C-linkage facade over SPDLogger so consumers can dynamic-load these via
|
||||
// GetProcAddress without depending on the C++ class ABI. Each call routes to
|
||||
// the process-wide SPDLogger singleton (thread-safe magic-static init).
|
||||
extern "C" {
|
||||
ANSLICENSE_API void ANSLogger_LogInfo (const char* src, const char* msg, const char* file, int line);
|
||||
ANSLICENSE_API void ANSLogger_LogError(const char* src, const char* msg, const char* file, int line);
|
||||
ANSLICENSE_API void ANSLogger_LogFatal(const char* src, const char* msg, const char* file, int line);
|
||||
}
|
||||
|
||||
// ANS_DBG: Debug logging macro for DebugView (OutputDebugStringA on Windows).
|
||||
// Usage: ANS_DBG("MyModule", "value=%d ptr=%p", val, ptr);
|
||||
// Output: [MyModule] value=42 ptr=0x1234
|
||||
|
||||
Reference in New Issue
Block a user