Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

Show HN: C++, Java and C# Light-Weight-Logger

A developer created a lightweight logging library available for C++, Java, and C# that allows users to define custom log formats with colors, column padding, and placeholders for timestamps, filenames, thread IDs, and line numbers.

Background

A developer released an open-source logging library for C++, Java, and C#. Logging libraries are a standard piece of almost every non-trivial application — they let developers record events (errors, warnings, info messages) with timestamps and context. What's distinctive here is the custom formatting system: users define a "master style" using placeholder codes (%C for color, %N for log level name, %D/%T for date/time, %F:%t:%L for file/thread/line), then assign that style to specific log levels (ERROR, WARN, INFO) with chosen colors. The library also auto-pads shorter log labels so all messages line up vertically in the console. This is a "Show HN" — a tradition on Hacker News where creators share their projects for feedback.

Related stories