Monitor for central heating system (e.g. 2zones+hw) Supports up to 15 temp probes (DS18B20/DS18S20) 3 valve monitors Gas pulse meter recording Use stand-alone or with nodeEnergyServer See http://robdobson.com/2015/09/central-heating-monitor

Dependencies:   EthernetInterfacePlusHostname NTPClient Onewire RdWebServer SDFileSystem-RTOS mbed-rtos mbed-src

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Logger.h Source File

Logger.h

00001 // Log to SD
00002 // Rob Dobson, 2015
00003 
00004 #ifndef __LOGGER__H
00005 #define __LOGGER__H
00006 #include "mbed.h"
00007 #include <stdarg.h>
00008 #include "rtos.h"
00009 
00010 class Logger
00011 {
00012     public:
00013         Logger(const char* eventLogFileName, const char* dataLogFileBase, Mutex &sdCardMutex);
00014         void LogEvent(const char* format, ...);
00015         void LogData(const char* format, ...);
00016         void LogDebug(const char* format, ...);
00017         void SetDebugDest(bool logToFile, bool logToConsole)
00018         {
00019             _logDebugToFile = logToFile;
00020             _logDebugToConsole = logToConsole;
00021         };
00022 
00023     private:
00024         const char* _eventLogFileName;
00025         const char* _dataLogFileBase;
00026         bool _logDebugToFile;
00027         bool _logDebugToConsole;
00028         Mutex &_sdCardMutex;
00029 };
00030 
00031 
00032 #endif