corporateshark / minilog Goto Github PK
View Code? Open in Web Editor NEWMinimalistic logging library with threads and manual callstacks
License: MIT License
Minimalistic logging library with threads and manual callstacks
License: MIT License
Hello. Interesting project. I currently lack the ability to define the font size and possibly colors for the HTML output. 10pt
is really small, I think.. Maybe it would be good to take it outside so that it can be adjusted?
Hello. In the README.md
you have an instruction to use a callback:
minilog::LogCallback cb = { .userData = this };
cb.funcs[minilog::Log] = [](void* data, const char* msg) { reinterpret_cast<GameConsole*>(data)->Display(msg); };
cb.funcs[minilog::Warning] = [](void* data, const char* msg) { reinterpret_cast<GameConsole*>(data)->DisplayError(msg); };
cb.funcs[minilog::FatalError] = [](void* data, const char* msg) { reinterpret_cast<GameConsole*>(data)->DisplayError(msg); };
minilog::callbackAdd(cb);
I didn't find how to pass the GameConsole
object to the logger?
Hello. I'm testing..
My code is:
minilog::initialize("/home/denis/Odey/SandBox/log.html",{
.htmlLog = true,
.htmlPageTitle = "Test",
.htmlPageHeader = "header",
.htmlPageFooter = "footer",
.mainThreadName = "MAIN"
});
minilog::log(minilog::Log, "Log!");
It produces this HTML code:
header<body><h1>Test</h1>
<div id="l1">(MAIN):01:04:07.881 minilog: initializing ...</div>
<div id="l1">(MAIN):01:04:07.881 minilog: log file: /home/denis/Odey/SandBox/log.html</div>
<div id="l1">(MAIN):01:04:07.881 Log!</div>
<div id="l1">(MAIN):01:04:07.881 minilog: deinitializing...</div>
footer
As you can see, the header and footer are outside the HTML structure!
Likewise, the minimum required basis for html is not generated: HTML
tags, HEAD
, BODY
...
Or are these fields for this one? Should I insert my HTML
, HEAD
and BODY
tags there?
Hello. Because I assume that my program will run on the PC 7 days a week, 24 hours a day, so I think it would be good to have the option to set the output data format.
For example, instead of this one
(MAIN):00:53:07.674 minilog: initializing ...
I'd rather see this one:
(MAIN):19.06.2024-00:53:07.674 minilog: initializing ...
I don't want to create another fork, so I'm wondering if you could modify it a bit, where it would be possible to pass the data format during initialization? :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.