stub_analytics_plugin  1.6
Network Optix Video Analytics SDK
output_redirector.h
1 #pragma once
2 
3 #include <string>
4 
5 #if !defined(NX_KIT_API)
6  #define NX_KIT_API
7 #endif
8 
9 namespace nx {
10 namespace kit {
11 
27 class NX_KIT_API OutputRedirector
28 {
29 public:
30  OutputRedirector(const OutputRedirector&) = delete;
31 
32  void operator=(const OutputRedirector&) = delete;
33 
34  static const OutputRedirector& getInstance();
35 
43  static void ensureOutputRedirection();
44 
45 protected: //< Intended for unit tests.
47 
48  static void redirectStdoutAndStderrIfNeeded(const char* overridingLogFilesDir = nullptr);
49 
50  static std::string getProcessName();
51 };
52 
53 } // namespace kit
54 } // namespace nx
Definition: debug.cpp:13
Definition: output_redirector.h:27