コード例 #1
0
Logger::Logger(const CString& cszName, LoggerPtr spParent)
:m_enLevel(none),
 m_bAdditivity(true),
 m_spParent(spParent),
 m_cszName(cszName)
{
   // construct a root logger?
   if (spParent.get() == NULL)
   {
      m_enLevel = debug;
      m_bAdditivity = false;
   }
}
コード例 #2
0
Log::Level Logger::GetLoggerLevel()
{
   Log::Level enLoggerLevel = m_enLevel;
   if (enLoggerLevel == none)
   {
      LoggerPtr spParent = m_spParent;
      do
      {
         ATLASSERT(spParent.get() != NULL);
         enLoggerLevel = spParent->Level();
         spParent = spParent->Parent();
      } while(enLoggerLevel == none);
   }

   return enLoggerLevel;
}