summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/mlua.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-06-24 13:08:55 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-06-24 13:08:55 +0000
commit0ccdb951979ead80e9264233776b9147ff701fc7 (patch)
tree904e408efb04c346e1694089cd863e6a56986563 /plugins/MirLua/src/mlua.cpp
parent2104de821739508078c23dcc046a5640bf300ea1 (diff)
MirLua: options and log cosmetics
git-svn-id: http://svn.miranda-ng.org/main/trunk@14362 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua.cpp')
-rw-r--r--plugins/MirLua/src/mlua.cpp11
1 files changed, 7 insertions, 4 deletions
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);