Changeset 986240
- Timestamp:
- 12/28/11 15:35:18 (17 months ago)
- Branches:
- ('master', 'a231b56d57a69513303d0061f5fa3e3cd51c85c1')('controller-upgrade', '72b31cc86eeeef18f1371a3067b6e8a5ca21abfc')('windows_service_fixes', 'df6bd2788365991d36d5af2a75833b8de2a5860f')
- Children:
- 05c0ac7f0512c87789a6d17ef38fe63e800a2085
- Parents:
- 50e69a476cde16d6a76f84133667182ecc4de8e3
- git-author:
- Micke Prag <micke.prag@telldus.se>2011-12-28 15:23:59+01:00
- git-committer:
- Micke Prag <micke.prag@telldus.se>2011-12-28 15:35:18+01:00
- Location:
- telldus-core/service
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
telldus-core/service/Log.cpp
r50e69a r986240 12 12 class Log::PrivateData { 13 13 public: 14 PrivateData() : logOutput(Log::System) {}14 PrivateData() : logOutput(Log::System), debug(false) {} 15 15 16 16 Log::LogOutput logOutput; 17 bool debug; 17 18 18 19 static Log *instance; … … 105 106 } 106 107 108 void Log::setDebug() { 109 Log *log = Log::instance(); 110 log->d->debug = true; 111 } 112 107 113 void Log::setLogOutput(LogOutput logOutput) { 108 114 Log *log = Log::instance(); … … 111 117 112 118 void Log::message(Log::LogLevel logLevel, const char *format, va_list ap) const { 119 if (logLevel == Debug && d->debug == false) { 120 return; 121 } 113 122 if (d->logOutput == StdOut) { 114 123 FILE *stream = stdout; -
telldus-core/service/Log.h
r50e69a r986240 17 17 static void error(const char *fmt, ...); 18 18 19 static void setDebug(); 19 20 static void setLogOutput(LogOutput logOutput); 20 21 -
telldus-core/service/TelldusWinService_win.cpp
r50e69a r986240 113 113 TelldusWinService instance; 114 114 115 //Enable debug if we hade this supplied 116 for(unsigned int i = 1; i < argc; ++i) { 117 if (wcscmp(argv[i], L"--debug") == 0) { 118 Log::setDebug(); 119 } 120 } 121 115 122 // initialise service status 116 123 instance.serviceStatus.dwServiceType = SERVICE_WIN32;
Note: See TracChangeset
for help on using the changeset viewer.
