Git Product home page Git Product logo

minilog's People

Contributors

corporateshark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

rokuz jjzhang166

minilog's Issues

How to set the font size of the HTML output?

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?

How to use callbacks?

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?

Adding your own text to the header or footer will destroy the entire HTML

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?

How to set output date format?

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? :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.