Fix up README
This commit is contained in:
12
README.md
12
README.md
@@ -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
|
||||
|
||||

|
||||
|
||||
## TODO
|
||||
|
||||
* Custom Contexts: Allow users to specify custom logging contexts for better organization.
|
||||
|
@@ -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__);
|
||||
|
14
main.cpp
14
main.cpp
@@ -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;
|
||||
///
|
||||
}
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user