Wiesner András 22233ce62d - earlier capabilities are accessible from Python
- MultiStreamReceiver and SampleWriter cleaned
- AcquisitionFormat introduced
- Logger created
- MultiStreamProcessor idea introduced, MultiStreamToFile introduced
- MATLAB scripts have been modified to load new capture folder structure
- began implementing MultiStreamOscilloscope
2022-05-05 00:11:48 +02:00

34 lines
854 B
C++

//
// Created by epagris on 2022.05.03..
//
#ifndef WFR_APP_LOGGER_H
#define WFR_APP_LOGGER_H
#include <string>
#include <unistd.h>
class Logger {
public:
static constexpr int LOG_FD_DEF = STDOUT_FILENO; // default log file descriptor
private:
static bool mLogEn; // enable logging
static int mLogFD; // file descriptor for logging
static bool mCloseOnStop; // close file when stopping logging
private:
Logger() = default; // constr.
public:
static void startLogging(int fd = STDOUT_FILENO); // start logging on given file descriptor
static void startLogging(const std::string &filename); // start logging using a filename
static void stopLogging(); // stop logging
// logging functions
static void log(const std::string &str);
static void logLine(const std::string &str);
};
#endif //WFR_APP_LOGGER_H