GitHub Updates

May 11, 2020

Took a stab at some of my repos to clean up and fix them properly, consolidating changes from various sources, adding licenses and making sure they compile.

Projects

The following projects now have proper licenses and are updated.

Some changes outlined below..

Logger

A tiny single-file (+ two header files) logging library for C++ projects. At the time it was written the API was modelled loosely after Log4J and Log4Net. But that probably isn’t true anymore. The library has been used in fairly big projects on several platforms over the years and has done a good job. I am currently using it for embedded projects on ESP32, Cortex-M4. The Logger has a built-in output sink for Arudino Serial (Compile with LOGGER_HAVE_SERIAL). Used and compiles on:

  • macOS (clang)
  • Windows (Visual Studio)
  • Linux (gcc/clang)
  • ESP32 (using Arudino or PlatformIO as the toolchain)
  • Cortex-M4 (using gcc-arm)

The Logger doesn’t aim to be the fastest nor the best. I wouldn’t use it for heavy backend work or when you need proper event tracing to some database. There are better alternatives for that. I would use it as a better printf alternative.

XMLParser

Another small (~1k LOC) single file (+ header) library to parse XML files. Supports DOM-style parsing and streaming. You can use this when you trust the source. No UTF-8 support - but could easily be added (I think). I use this on embedded as well to consume server-side generated XML. The XMLParser compiles on:

  • macOS (clang)
  • Windows (Visual Studio)
  • Linux (clang/gcc)
  • ESP32 (Arduino or PlatformIO as toolchain)
  • ARM (using gcc-arm)

Another features of this library - it is decently fast.

Test Runner

My C/C++ unit test tool. Support has been added for executing test-cases in their own thread. If an error occurs during execution the thread is terminated and so is the test case execution. Also added support for assert handling, no need to write if statements to check errors.


Profile picture

Written by Fredrik Kling. I live and work in Switzerland. Follow me Twitter