Merge pull request #133 from alliedmodders/logger-logic
Move Logger and core natives from core to logic (r=dvander).
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include <ISourceMod.h>
|
||||
#include <ITranslator.h>
|
||||
#include "common_logic.h"
|
||||
#include "Logger.h"
|
||||
|
||||
#if defined PLATFORM_WINDOWS
|
||||
#include <io.h>
|
||||
@@ -637,7 +638,7 @@ static cell_t sm_LogMessage(IPluginContext *pContext, const cell_t *params)
|
||||
}
|
||||
|
||||
IPlugin *pPlugin = pluginsys->FindPluginByContext(pContext->GetContext());
|
||||
smcore.Log("[%s] %s", pPlugin->GetFilename(), buffer);
|
||||
g_Logger.LogMessage("[%s] %s", pPlugin->GetFilename(), buffer);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -655,7 +656,7 @@ static cell_t sm_LogError(IPluginContext *pContext, const cell_t *params)
|
||||
}
|
||||
|
||||
IPlugin *pPlugin = pluginsys->FindPluginByContext(pContext->GetContext());
|
||||
smcore.LogError("[%s] %s", pPlugin->GetFilename(), buffer);
|
||||
g_Logger.LogError("[%s] %s", pPlugin->GetFilename(), buffer);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -708,7 +709,7 @@ static cell_t sm_LogToOpenFile(IPluginContext *pContext, const cell_t *params)
|
||||
}
|
||||
|
||||
IPlugin *pPlugin = pluginsys->FindPluginByContext(pContext->GetContext());
|
||||
smcore.LogToFile(pFile, "[%s] %s", pPlugin->GetFilename(), buffer);
|
||||
g_Logger.LogToOpenFile(pFile, "[%s] %s", pPlugin->GetFilename(), buffer);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -738,7 +739,7 @@ static cell_t sm_LogToOpenFileEx(IPluginContext *pContext, const cell_t *params)
|
||||
return 0;
|
||||
}
|
||||
|
||||
smcore.LogToFile(pFile, "%s", buffer);
|
||||
g_Logger.LogToOpenFile(pFile, "%s", buffer);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user