eliminate RageLog prefsman use
This commit is contained in:
@@ -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 )
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user