Log system write in C++ (console & file)
$git submodule add git@github.com:Vincent-Devine/Log_System.git
Include Log.hpp
in your files.
#include "Log.hpp"
// Start of your program
Log::OpenFile("log.txt");
// ...
// End of your program
Log::CloseFile();
Call macro LOG_INFO
, LOG_DEBUG
, LOG_WARNING
or LOG_ERROR
to write your log to the console and your file (if you've opened it before).
The log message is preceded by the log level, the time, the file, the line and the function in which th log was called.
#include "Log.hpp"
int main()
{
LOG_INFO("hello");
LOG_DEBUG("hello");
LOG_WARNING("hello");
LOG_ERROR("hello");
// ...
}
#include "Log.hpp"
Assertion(true, "gg, true == true");
- C++ 20
- Windows system
Vincent DEVINE