Last change
on this file since 37 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 |
|
---|
4 | Logger::Logger(void)
|
---|
5 | {
|
---|
6 | m_nLogMode = LOG_ALL;
|
---|
7 | }
|
---|
8 |
|
---|
9 | Logger::~Logger(void)
|
---|
10 | {
|
---|
11 | }
|
---|
12 |
|
---|
13 | void Logger::LogLine(const std::string sText)
|
---|
14 | {
|
---|
15 | boost::mutex::scoped_lock lock(m_mutex);
|
---|
16 | std::clog << sText << std::endl;
|
---|
17 | }
|
---|
18 |
|
---|
19 | void Logger::LogInfo(const std::string sInfo)
|
---|
20 | {
|
---|
21 | if ((m_nLogMode & LOG_INFO) != 0)
|
---|
22 | LogLine(sInfo);
|
---|
23 | }
|
---|
24 | void Logger::LogError(const std::string sError)
|
---|
25 | {
|
---|
26 | if ((m_nLogMode & LOG_ERRORS) != 0)
|
---|
27 | LogLine(sError);
|
---|
28 | }
|
---|
29 | void Logger::LogWarning(const std::string sWarning)
|
---|
30 | {
|
---|
31 | if ((m_nLogMode & LOG_WARNINGS) != 0)
|
---|
32 | LogLine(sWarning);
|
---|
33 | }
|
---|
34 |
|
---|
35 | void Logger::LogCapture(const std::string sData)
|
---|
36 | {
|
---|
37 | if ((m_nLogMode & LOG_CAPTURE) != 0)
|
---|
38 | LogLine(sData);
|
---|
39 | }
|
---|
40 |
|
---|
41 | void 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.