Skip to content

Commit

Permalink
Don't special case log level ignoring for VS
Browse files Browse the repository at this point in the history
Odds are we always want a debug log when debugging or profiling.  The
hit here should be marginal in comparison to the code simplification.
  • Loading branch information
althekiller committed Feb 10, 2011
1 parent 85d61ae commit d13f1a8
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions xbmc/utils/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ void CLog::Close()
void CLog::Log(int loglevel, const char *format, ... )
{
CSingleLock waitLock(critSec);
#if !(defined(_DEBUG) || defined(PROFILE))
if (m_logLevel > LOG_LEVEL_NORMAL ||
(m_logLevel > LOG_LEVEL_NONE && loglevel >= LOGNOTICE))
#endif
{
if (!m_file)
return;
Expand Down Expand Up @@ -126,27 +128,6 @@ void CLog::Log(int loglevel, const char *format, ... )
fputs(strData.c_str(), m_file);
fflush(m_file);
}
#ifndef _LINUX
#if defined(_DEBUG) || defined(PROFILE)
else
{
// In debug mode dump everything to devstudio regardless of level
CSingleLock waitLock(critSec);
CStdString strData;
strData.reserve(16384);

va_list va;
va_start(va, format);
strData.FormatV(format, va);
va_end(va);

OutputDebugString(strData.c_str());
if( strData.Right(1) != "\n" )
OutputDebugString("\n");

}
#endif
#endif
}

bool CLog::Init(const char* path)
Expand Down

0 comments on commit d13f1a8

Please sign in to comment.