Skip to content

Releases: filipdutescu/small-better-logger

Released version 2.0.0

27 Mar 20:30

Choose a tag to compare

New Features

  • Made all loggers thread-safe
  • Added automatic OS detection with predefined macros

Changes

  • Removed unnecessary const value returns (i.e.: LogLevel sblogger::Logger::GetLoggingLevel())
  • Removed rvalue overloads to methods and constructors, due to lack of purpose, when using const references

Bug Fixes

  • Fixed call of strrchr which could return nullptr, leading to a runtime error/crash
  • Removed non standard compliant inlines from code

Released version 1.0.0

27 Mar 13:10

Choose a tag to compare

Small, Better Logger v1.0.0

A small, cross-platform one header file logger library, compatible with all standards from C++11 onwards (support for C++20 coming ASAP, waiting on std::chrono formatting support). Inspired by the C# Console class.

Any and all feedback is greatly appreciated!

Why use this library and not another?

The aim of this project was to make something as easy to use as I could. I wanted to be able to just copy and paste it into any project, without the need to link libraries, move multiple files and folders etc. At most, you need to define 3-4 macros (or just 2 if you can bother setting a compiler flag).

It was also an opportunity for me to make a full, complete and tested project, complete with well written documentation. I aimed to learn as much as I could from multithreading to date manipulation.

What does it offer?

A quick summary of what it offers:

The following loggers:

  • StreamLogger - which writes to the standard streams

  • FileLogger - which writes to a file

  • DailyLogger - which writes to a file that changes daily at the specified time

Placeholders to customize your logs, such as:

  • "{i}" - replaces the sequence with the i-th parameter of your log call (examples can be found both in the REAME.md and Wiki)

  • All time and date placeholders available in strftime

  • Placeholders for file, line and function information

  • Standard stream output colour modifiers

I hope you either like it, use it or both!