source: trunk/ETSI-Testsuites/ETSI_auto_IOT/adapter/src/Logger/Logger.cpp

Last change on this file was 22, checked in by rings, 14 years ago
  • Property svn:executable set to *
File size: 860 bytes
Line 
1#include "Logger.h"
2#include <iostream>
3
4Logger::Logger(void)
5{
6  m_nLogMode = LOG_ALL;
7}
8
9Logger::~Logger(void)
10{
11}
12
13void Logger::LogLine(const std::string sText)
14{
15  boost::mutex::scoped_lock lock(m_mutex);
16  std::clog << sText << std::endl;
17}
18
19void Logger::LogInfo(const std::string sInfo)
20{
21  if ((m_nLogMode & LOG_INFO) != 0)
22    LogLine(sInfo);
23}
24void Logger::LogError(const std::string sError)
25{
26  if ((m_nLogMode & LOG_ERRORS) != 0)
27    LogLine(sError);
28}
29void Logger::LogWarning(const std::string sWarning)
30{
31  if ((m_nLogMode & LOG_WARNINGS) != 0)
32    LogLine(sWarning);
33}
34
35void Logger::LogCapture(const std::string sData)
36{
37  if ((m_nLogMode & LOG_CAPTURE) != 0)
38    LogLine(sData);
39}
40
41void Logger::LogDebug(const std::string sDebugInfo)
42{
43  if ((m_nLogMode & LOG_DEBUG) != 0)
44    LogLine(sDebugInfo);
45}
Note: See TracBrowser for help on using the repository browser.