libmx2 2.2.1
C++20 multimedia and game-engine library (SDL2 / OpenGL / Vulkan)
Loading...
Searching...
No Matches
tee_stream.cpp File Reference

Implementation of mx::TeeBuf, mx::TeeStream, and the redirect() helper. More...

#include "tee_stream.hpp"
#include <filesystem>
Include dependency graph for tee_stream.cpp:

Go to the source code of this file.

Namespaces

namespace  mx

Functions

static std::ofstream mx::log_file ("system.log.txt", std::ios::out)
static std::ofstream mx::error_file ("error.log.txt", std::ios::out)
void mx::redirect ()
 Redirect std::cout and std::cerr through the tee streams.

Variables

TeeStream mx::system_out (std::cout, log_file)
 Global stdout + log tee stream.
TeeStream mx::system_err (std::cerr, error_file)
 Global stderr + log tee stream.

Detailed Description

Implementation of mx::TeeBuf, mx::TeeStream, and the redirect() helper.

Definition in file tee_stream.cpp.