#ifndef DEBUG_DEBUGGING_H #define DEBUG_DEBUGGING_H #include #include #include #include #include "debuglog.hpp" namespace Debug { // ANSI colors for terminal enum Color { Reset = 0, DarkGray = 90, Red = 91, Yellow = 93 }; #ifdef _WIN32 bool attachParentConsole(); #endif using LogListener = std::function; void setLogListener(LogListener); } // Can be used to print messages without timestamps std::ostream& getRawStdout(); std::ostream& getRawStderr(); Misc::Locked getLockedRawStderr(); void setupLogging( const std::filesystem::path& logDir, std::string_view appName, std::ios_base::openmode mode = std::ios::out); int wrapApplication(int (*innerApplication)(int argc, char* argv[]), int argc, char* argv[], std::string_view appName); #endif