From 0ccdb951979ead80e9264233776b9147ff701fc7 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Wed, 24 Jun 2015 13:08:55 +0000 Subject: MirLua: options and log cosmetics git-svn-id: http://svn.miranda-ng.org/main/trunk@14362 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/mlua.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'plugins/MirLua/src/mlua.cpp') diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp index 7f5d8027c0..f42f0fecdb 100644 --- a/plugins/MirLua/src/mlua.cpp +++ b/plugins/MirLua/src/mlua.cpp @@ -3,6 +3,7 @@ CMLua::CMLua() : L(NULL) { console = new CMLuaConsole(L); + hLogger = mir_createLog(MODULE, _T("MirLua log"), VARST(_T("%miranda_logpath%\\MirLua.txt")), 0); Load(); } @@ -10,13 +11,15 @@ CMLua::CMLua() : L(NULL) CMLua::~CMLua() { Unload(); - + mir_closeLog(hLogger); delete console; } void CMLua::Load() { + mir_writeLogT(hLogger, _T("Loading lua engine\n")); L = luaL_newstate(); + mir_writeLogT(hLogger, _T("Loading std modules\n")); luaL_openlibs(L); lua_getglobal(L, "package"); @@ -29,15 +32,15 @@ void CMLua::Load() MUUID muidLast = MIID_LAST; hScriptsLangpack = GetPluginLangId(muidLast, 0); - hLogger = mir_createLog(MODULE, _T("MirLua log"), VARST(_T("%miranda_logpath%\\MirLua.txt")), 0); - + mir_writeLogT(hLogger, _T("Loading miranda modules\n")); CLuaModuleLoader::Load(L); CLuaScriptLoader::Load(L, hLogger); } void CMLua::Unload() { - mir_closeLog(hLogger); + mir_writeLogT(hLogger, _T("Unloading lua engine\n")); + if (L) lua_close(L); KillModuleMenus(hScriptsLangpack); -- cgit v1.2.3