A header only library for capturing and tee-ing std::cout to a file.
  • C++ 98.1%
  • CMake 1.9%
Find a file
2026-05-24 15:48:37 -05:00
.clang-format Initial implementation 2026-05-24 15:46:58 -05:00
.gitignore Initial implementation 2026-05-24 15:46:58 -05:00
CMakeLists.txt Initial implementation 2026-05-24 15:46:58 -05:00
example.cpp Initial implementation 2026-05-24 15:46:58 -05:00
LICENSE.md Initial implementation 2026-05-24 15:46:58 -05:00
README.md Initial implementation 2026-05-24 15:46:58 -05:00
tattl.hpp Initial implementation 2026-05-24 15:46:58 -05:00

tattl

tattl is a header only library that hijacks cout to attach it to a log file.

Usage

Anywhere in the application, include tattl.hpp and create a static instance of the tail_t object. Afterwards, anywhere std::cout is used it will be printed to the log file specified.

# include <tattl.hpp>

static tattl::tail_t tail("app.log");

Example

An example of usage is provided in example.cpp. To build and run the example, run the command cmake -B build -G Ninja; cmake --build build; ./build/example in the top level directory.

Copyright© 2026 Billy Ray Fortenbury (br410bury). See LICENSE.md for license details.