diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-06-22 14:50:15 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-06-22 14:50:15 +0000 |
commit | f84128a1886b1154beff66cf13314bdfc412bed0 (patch) | |
tree | 2958c1ed544c2d61cb1bc3d2bb990d8109bcbce1 /plugins/MirLua/src/mlua_script_loader.cpp | |
parent | 631e22caadf37a547bafccc0f90251621b0bd987 (diff) |
MirLua: added logging to scripts loader
git-svn-id: http://svn.miranda-ng.org/main/trunk@14329 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua_script_loader.cpp')
-rw-r--r-- | plugins/MirLua/src/mlua_script_loader.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/MirLua/src/mlua_script_loader.cpp b/plugins/MirLua/src/mlua_script_loader.cpp index 4ea6c73f80..dc64e2215a 100644 --- a/plugins/MirLua/src/mlua_script_loader.cpp +++ b/plugins/MirLua/src/mlua_script_loader.cpp @@ -2,6 +2,7 @@ CLuaScriptLoader::CLuaScriptLoader(lua_State *L) : L(L)
{
+ hLogger = mir_createLog(MODULE, _T("MirLua script loader log"), VARST(_T("%miranda_logpath%\\MirLua.txt")), 0);
}
void CLuaScriptLoader::RegisterScriptsFolder(const char *path)
@@ -18,7 +19,11 @@ void CLuaScriptLoader::RegisterScriptsFolder(const char *path) void CLuaScriptLoader::LoadScript(const char *path)
{
if (luaL_dofile(L, path))
+ {
+ const char *error = lua_tostring(L, -1);
+ mir_writeLogT(hLogger, _T("%s"), ptrT(mir_utf8decodeT(error)));
printf("%s\n", lua_tostring(L, -1));
+ }
}
void CLuaScriptLoader::LoadScripts(const TCHAR *scriptDir)
|