F´ Flight Software - C/C++ Documentation  NASA-v1.6.0
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,
19  POINTER_CAST a2, POINTER_CAST a3, POINTER_CAST a4, POINTER_CAST a5,
20  POINTER_CAST a6, POINTER_CAST a7, POINTER_CAST a8, POINTER_CAST a9) {
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 };
35 //End namespace Fw
Fw::Logger
Definition: Logger.hpp:15
Fw::Logger::log
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
Fw::Logger::~Logger
virtual ~Logger()
Definition: Logger.cpp:31
Fw::Logger::registerLogger
static void registerLogger(Logger *logger)
Static logger to use when calling the above 'logMsg' function.
Definition: Logger.cpp:27
Fw::Logger::s_current_logger
static Logger * s_current_logger
Definition: Logger.hpp:84
Fw::Logger::logMsg
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
Logger.hpp
Fw
Definition: SerIds.hpp:20