mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
added lost logfile feature
This commit is contained in:
parent
2967c57ddc
commit
49cefa406b
|
@ -2027,6 +2027,8 @@ int main(int argc, const char **argv) // ignore_convention
|
|||
// execute config file
|
||||
pConsole->ExecuteFile("settings.cfg");
|
||||
|
||||
m_Client.Engine()->InitLogfile();
|
||||
|
||||
// run the client
|
||||
m_Client.Run();
|
||||
|
||||
|
|
|
@ -1430,6 +1430,8 @@ int main(int argc, const char **argv) // ignore_convention
|
|||
if(argc > 1) // ignore_convention
|
||||
pConsole->ParseArguments(argc-1, &argv[1]); // ignore_convention
|
||||
|
||||
pServer->Engine()->InitLogfile();
|
||||
|
||||
// run the server
|
||||
pServer->Run();
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
MACRO_CONFIG_STR(PlayerName, player_name, 24, "nameless tee", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Name of the player")
|
||||
MACRO_CONFIG_STR(ClanName, clan_name, 32, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "(not used)")
|
||||
MACRO_CONFIG_STR(Password, password, 32, "", CFGFLAG_CLIENT|CFGFLAG_SERVER, "Password to the server")
|
||||
MACRO_CONFIG_STR(Logfile, logfile, 128, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filename to log all output to")
|
||||
MACRO_CONFIG_STR(Logfile, logfile, 128, "", CFGFLAG_SAVE|CFGFLAG_CLIENT|CFGFLAG_SERVER, "Filename to log all output to")
|
||||
|
||||
MACRO_CONFIG_INT(ClCpuThrottle, cl_cpu_throttle, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "")
|
||||
MACRO_CONFIG_INT(ClEditor, cl_editor, 0, 0, 1, CFGFLAG_CLIENT, "")
|
||||
|
|
|
@ -61,6 +61,12 @@ void CEngine::Init(const char *pAppname)
|
|||
//config_reset();
|
||||
}
|
||||
|
||||
void CEngine::InitLogfile()
|
||||
{
|
||||
// open logfile if needed
|
||||
if(g_Config.m_Logfile[0])
|
||||
dbg_logger_file(g_Config.m_Logfile);
|
||||
}
|
||||
|
||||
static int HostLookupThread(void *pUser)
|
||||
{
|
||||
|
|
|
@ -17,6 +17,7 @@ class CEngine
|
|||
|
||||
public:
|
||||
void Init(const char *pAppname);
|
||||
void InitLogfile();
|
||||
void HostLookup(CHostLookup *pLookup, const char *pHostname);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue