};
// called whenever we need to open/close/check the console log file
-void Sys_LogFile( bool enable ){
+void Sys_EnableLogFile( bool enable ){
if ( enable && !g_hLogFile ) {
// settings say we should be logging and we don't have a log file .. so create it
if ( !SettingsPath_get()[0] ) {
bool contains_newline = std::find( buf, buf + length, '\n' ) != buf + length;
if ( level == SYS_ERR ) {
- Sys_LogFile( true );
+ Sys_EnableLogFile( true );
}
if ( g_hLogFile != 0 ) {
std::size_t Sys_Print( int level, const char* buf, std::size_t length );
// will open/close the log file based on the parameter
-void Sys_LogFile( bool enable );
+void Sys_EnableLogFile( bool enable );
extern bool g_Console_enableLogging;
ERROR_MESSAGE( text );
// force close logging if necessary
- Sys_LogFile( false );
+ Sys_EnableLogFile( false );
_exit( 1 );
}
// set without saving, the class is not in a coherent state yet
// just do the value change and call to start logging, CGamesDialog will pickup when relevant
g_GamesDialog.m_bForceLogConsole = true;
- Sys_LogFile( true );
+ Sys_EnableLogFile( true );
}
// create a primary .pid for global init run
// force console logging on! (will go in prefs too)
g_GamesDialog.m_bForceLogConsole = true;
- Sys_LogFile( true );
+ Sys_EnableLogFile( true );
}
else
{
// we may have the console turned on and want to keep it that way
// so we use a latching system
if ( g_GamesDialog.m_bForceLogConsole ) {
- Sys_LogFile( true );
+ Sys_EnableLogFile( true );
g_Console_enableLogging = true;
g_GamesDialog.m_bForceLogConsole = false;
}
Radiant_Shutdown();
// close the log file if any
- Sys_LogFile( false );
+ Sys_EnableLogFile( false );
return EXIT_SUCCESS;
}
static void Import(bool value) {
g_Console_enableLogging = value;
- Sys_LogFile(g_Console_enableLogging);
+ Sys_EnableLogFile(g_Console_enableLogging);
}
};