Add debug and log functions to ANSLIB

This commit is contained in:
2026-04-26 06:59:42 +10:00
parent 947398483a
commit f81737ffc6
9 changed files with 585 additions and 23 deletions

View File

@@ -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