50 lines
1.2 KiB
C++
50 lines
1.2 KiB
C++
// Josh's Logger
|
|
// Minimal, robust, Modern (C++20) Logging Framework
|
|
// Created by Joshua O'Leary @ Redacted Software, June 2024
|
|
// Contact: josh@redacted.cc
|
|
// Contributors: william@redacted.cc maxi@redacted.cc
|
|
// This work is dedicated to the public domain.
|
|
#include <jlog/jlog.hpp>
|
|
#include "map"
|
|
|
|
|
|
int main()
|
|
{
|
|
jlog::INFO("This dick");
|
|
jlog::DEBUG("This dick");
|
|
jlog::VERBOSE.Log("This dick");
|
|
jlog::WARNING.Log("This dick");
|
|
jlog::ERROR.Log("This dick");
|
|
jlog::FATAL.Log("This dick");
|
|
|
|
jlog::INFO("This dick");
|
|
jlog::DEBUG.LogTrace("This dick");
|
|
jlog::VERBOSE.LogTrace("This dick");
|
|
jlog::WARNING.LogTrace("This dick");
|
|
jlog::ERROR.LogTrace("This dick");
|
|
jlog::FATAL.LogTrace("This dick");
|
|
|
|
|
|
jlog::Logger cock{"COCK"};
|
|
//jlog::Logger info{"I"};
|
|
jlog::Logger error{"E"};
|
|
error.ColorCode(mcolor::ansiColors::Colors::FG_BRIGHT_RED);
|
|
//cock.AddChild(&info);
|
|
cock.AddChild(&error);
|
|
|
|
cock.Log("dick ass");
|
|
//cock.Log("I" "dick ass");
|
|
error.Log("dick ass");
|
|
error.LogTrace("dick ass" " " + error.Parent()->Context());
|
|
|
|
return 0;
|
|
}
|
|
|
|
//Windows :(
|
|
#ifdef _WIN32
|
|
extern "C" {
|
|
int wmain(int argc, wchar_t* argv[]) {
|
|
return main();
|
|
}
|
|
}
|
|
#endif |