eliminate RageLog prefsman use

This commit is contained in:
Glenn Maynard
2003-10-02 03:13:51 +00:00
parent 81c4f0b9e9
commit d26b22eb8f
3 changed files with 10 additions and 2 deletions
+7 -2
View File
@@ -16,7 +16,6 @@
#include "RageLog.h"
#include "RageUtil.h"
#include "RageTimer.h"
#include "PrefsManager.h"
#include "RageFile.h"
#include <time.h>
#include "ProductInfo.h"
@@ -87,6 +86,7 @@ RageLog::RageLog()
{
m_bEnabled = true;
m_bFlush = false;
m_bTimestamping = false;
// delete old log files
remove( LOG_PATH );
@@ -146,6 +146,11 @@ void RageLog::SetFlushing( bool b )
m_bFlush = b;
}
void RageLog::SetTimestamping( bool b )
{
m_bTimestamping = b;
}
void RageLog::ShowConsole()
{
#if defined(WIN32) && !defined(_XBOX)
@@ -206,7 +211,7 @@ void RageLog::Warn( const char *fmt, ...)
void RageLog::Write( int where, CString str)
{
if( PREFSMAN && PREFSMAN->m_bTimestamping )
if( m_bTimestamping )
str = SecondsToTime(RageTimer::GetTimeSinceStart()) + ": " + str;
if( where&WRITE_TO_INFO && m_fileInfo )
+2
View File
@@ -36,10 +36,12 @@ public:
void SetLogging( bool b ); // enable or disable logging
void SetFlushing( bool b ); // enable or disable flushing
void SetTimestamping( bool b ); // enable or disable timestamping
private:
bool m_bEnabled;
bool m_bFlush;
bool m_bTimestamping;
FILE *m_fileLog, *m_fileInfo;
void Write( int, CString );
void UpdateMappedLog();
+1
View File
@@ -637,6 +637,7 @@ int main(int argc, char* argv[])
LOG->SetLogging( PREFSMAN->m_bLogging );
LOG->SetFlushing( PREFSMAN->m_bForceLogFlush );
LOG->SetTimestamping( PREFSMAN->m_bTimestamping );
CheckSettings();