LINUX.ORG.RU

История изменений

Исправление pathfinder, (текущая версия) :

template<typename LogManager>
inline void Log(const LogManager& log_manager,/*some parameters*/)
{
  if(log_manager)
  {
     _Log(/*some parameters*/);
  }
}

LogManager определяет необходимость логгирования

const bool debug_serial = false;
const bool debug_gui = true;
const bool debug_some = true;

Log(debug_serial,"Bla-Bla-Bla");
Log(debug_serial,"Bla-Bla-Bla");
Log(debug_serial,"Bla-Bla-Bla");

Log(debug_gui,"Bla-Bla-Bla");
Log(debug_gui,"Bla-Bla-Bla");
Log(debug_gui,"Bla-Bla-Bla");

Log(debug_some,"Bla-Bla-Bla");
Log(debug_some,"Bla-Bla-Bla");
Log(debug_some,"Bla-Bla-Bla");

Исправление pathfinder, :

template<typename LogManager>
inline void Log(LogManager log_manager,/*some parameters*/)
{
  if(log_manager)
  {
     _Log(/*some parameters*/);
  }
}

LogManager определяет необходимость логгирования

const bool debug_serial = false;
const bool debug_gui = true;
const bool debug_some = true;

Log(debug_serial,"Bla-Bla-Bla");
Log(debug_serial,"Bla-Bla-Bla");
Log(debug_serial,"Bla-Bla-Bla");

Log(debug_gui,"Bla-Bla-Bla");
Log(debug_gui,"Bla-Bla-Bla");
Log(debug_gui,"Bla-Bla-Bla");

Log(debug_some,"Bla-Bla-Bla");
Log(debug_some,"Bla-Bla-Bla");
Log(debug_some,"Bla-Bla-Bla");

Исходная версия pathfinder, :

template<typename LogManager>
inline void Log(LogManager log_manager,/*some parameters*/)
{
  if(log_manager)
  {
     _Log(/*some parameters*/);
  }
}

LogManager определяет необходимость логгирования

const bool debug_serial = false;
const bool debug_gui true;
const bool debug_some = true;

Log(debug_serial,"Bla-Bla-Bla");
Log(debug_serial,"Bla-Bla-Bla");
Log(debug_serial,"Bla-Bla-Bla");

Log(debug_gui,"Bla-Bla-Bla");
Log(debug_gui,"Bla-Bla-Bla");
Log(debug_gui,"Bla-Bla-Bla");

Log(debug_some,"Bla-Bla-Bla");
Log(debug_some,"Bla-Bla-Bla");
Log(debug_some,"Bla-Bla-Bla");