Fix up README

This commit is contained in:
2024-06-14 12:47:46 -04:00
parent 7ab579fa0b
commit 17bd6b17ff
4 changed files with 16 additions and 13 deletions

View File

@@ -37,14 +37,22 @@ Using jlog is straightforward:
#include <jlog.h>
int main() {
jlog::info("This is barely useful information.");
jlog::error("Oops, something went wrong.");
INFO("This is barely useful information.");
DEBUG("Debugging Information");
VERBOSE("Yadda Yadda Yadda");
WARNING("Slight miscalculation!");
ERROR("Oops, something went wrong.");
FATAL("Unrecoverable Error!!!");
return 0;
}
```
## Output
![Should be sample output...](img.png)
## TODO
* Custom Contexts: Allow users to specify custom logging contexts for better organization.

View File

@@ -66,8 +66,6 @@ namespace jlog
void error_spec(const std::string& message, const std::string& func, const std::string& file, int line);
void fatal_spec(const std::string& message, const std::string& func, const std::string& file, int line);
}
#define INFO(i) jlog::info_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);

View File

@@ -1,15 +1,13 @@
#include <jlog/ansi_escape_codes.hpp>
#include <jlog/jlog.hpp>
int main()
{
INFO("Do the needful!");
DEBUG("Debugging Message 123");
ERROR("Big problem!");
VERBOSE("Irrelevant message...");
WARNING("Our software suite is only supported on C++20! Get with it grampa.");
FATAL("Real Fuckin Error");
INFO("This is barely useful information.");
DEBUG("Debugging Information");
VERBOSE("Yadda Yadda Yadda");
WARNING("Slight miscalculation!");
ERROR("Oops, something went wrong.");
FATAL("Unrecoverable Error!!!");
return 0;
///
}

View File

@@ -8,7 +8,6 @@ namespace jlog {
static void log_to_console(const std::string& message);
static void log_to_file(const std::string& message);
std::string get_timestamp()
{
using namespace std::chrono;