F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
Logger.cpp
Go to the documentation of this file.
1 
10 #include <Fw/Logger/Logger.hpp>
11 
12 namespace Fw {
13 
14 //Initial logger is NULL
15  Logger* Logger::s_current_logger = nullptr;
16 
17 // Basic log implementation
18  void Logger::logMsg(const char* fmt, POINTER_CAST a0, POINTER_CAST a1,
21  // Log if capable, otherwise drop
22  if (Logger::s_current_logger != nullptr) {
23  Logger::s_current_logger->log(fmt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
24  }
25  }
26 // Register the logger
28  Logger::s_current_logger = logger;
29  }
30 
32  }
33 
34 } //End namespace Fw
PlatformPointerCastType POINTER_CAST
Definition: BasicTypes.h:53
static void logMsg(const char *fmt, POINTER_CAST a0=0, POINTER_CAST a1=0, POINTER_CAST a2=0, POINTER_CAST a3=0, POINTER_CAST a4=0, POINTER_CAST a5=0, POINTER_CAST a6=0, POINTER_CAST a7=0, POINTER_CAST a8=0, POINTER_CAST a9=0)
Definition: Logger.cpp:18
static void registerLogger(Logger *logger)
Static logger to use when calling the above 'logMsg' function.
Definition: Logger.cpp:27
virtual void log(const char *fmt, POINTER_CAST a0=0, POINTER_CAST a1=0, POINTER_CAST a2=0, POINTER_CAST a3=0, POINTER_CAST a4=0, POINTER_CAST a5=0, POINTER_CAST a6=0, POINTER_CAST a7=0, POINTER_CAST a8=0, POINTER_CAST a9=0)=0
virtual ~Logger()
Definition: Logger.cpp:31
static Logger * s_current_logger
Definition: Logger.hpp:84