diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Dbx_mdbx/src/init.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/Dbx_mdbx/src/init.cpp b/plugins/Dbx_mdbx/src/init.cpp index 391fe88b56..a7b69ed1ad 100644 --- a/plugins/Dbx_mdbx/src/init.cpp +++ b/plugins/Dbx_mdbx/src/init.cpp @@ -51,6 +51,15 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_DATABA /////////////////////////////////////////////////////////////////////////////////////////
+static void logger(int type, const char *function, int line, const char *msg, va_list args)
+{
+ char tmp[4096];
+ _vsnprintf_s(tmp, _countof(tmp), msg, args);
+ Netlib_Logf(nullptr, "MDBX[%d] (%s, %d): %s", type, function, line, tmp);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
// returns 0 if the profile is created, EMKPRF*
static int makeDatabase(const TCHAR *profile)
{
@@ -90,6 +99,7 @@ static DATABASELINK dblink = int CMPlugin::Load()
{
+ mdbx_setup_debug(MDBX_DBG_ASSERT | MDBX_DBG_PRINT, &logger);
RegisterDatabasePlugin(&dblink);
return 0;
}
|