‹ Reports
The Dispatch

OSS Report: gabime/spdlog


Compilation Fixes Dominate Recent spdlog Development

The spdlog project, a high-performance C++ logging library, has recently focused on resolving compilation issues, particularly with GCC 8.5, as addressed by Eugene Smirnov. This effort underscores the project's commitment to maintaining compatibility across various compilers.

The spdlog library is designed to provide fast and flexible logging capabilities for C++ applications. It supports both synchronous and asynchronous logging, multiple log targets, and extensive formatting options via the fmt library.

Recent Activity

Recent pull requests and issues have highlighted a focus on enhancing compatibility and addressing bugs. For instance, PR #3128 introduces attribute support for logging, which could improve context management but raises concerns about race conditions in multi-threaded environments. PR #3157 aims to improve static variable initialization but has led to memory leak issues.

Development Team Activity

  1. Eugene Smirnov (esmirno)

  2. zjyhjqs

    • 46 days ago: Adjusted MSVC settings to fix warnings.
  3. Alex Overchenko (AJIOB)

    • 52 days ago: Addressed build issues related to FMT_ENFORCE_COMPILE_STRING.
  4. Ziyao (ziyao233)

    • 60 days ago: Updated examples for fmt version 11 compatibility.
  5. Philippe Vaucher (Silex)

    • 65 days ago: Customized syslog_sink.
  6. Dominik Grabiec (DominikGrabiec)

    • 108 days ago: Added wide character support for wincolor_sink.
  7. Gabi Melman (gabime)

    • Multiple contributions over months, focusing on documentation updates and feature enhancements.

Of Note

Quantified Reports

Quantify Issues



Recent GitHub Issues Activity

Timespan Opened Closed Comments Labeled Milestones
7 Days 4 7 12 4 1
30 Days 11 11 30 11 1
90 Days 43 29 126 43 1
1 Year 197 182 775 197 1
All Time 2140 2092 - - -

Like all software activity quantification, these numbers are imperfect but sometimes useful. Comments, Labels, and Milestones refer to those issues opened in the timespan in question.

Quantify commits



Quantified Commit Activity Over 30 Days

Developer Avatar Branches PRs Commits Files Changes
Eugene Smirnov 1 1/1/0 1 2 10
Lixingcong (lixingcong) 0 1/0/0 0 0 0
喜多喜多 (RickSchanze) 0 1/0/1 0 0 0
Jaroslaw Pelczar (jarekpelczar) 0 1/0/0 0 0 0
Sivachandran Paramasivam (sivachandran) 0 1/0/1 0 0 0

PRs: created by that dev and opened/merged/closed-unmerged during the period

Detailed Reports

Report On: Fetch issues



Recent Activity Analysis

The spdlog repository currently has 48 open issues, with recent activity indicating a mix of questions, bugs, and feature requests. Notably, several issues highlight compatibility problems with different versions of the fmt library, particularly with the transition to fmt 10.0.0 and above. There are also recurring themes around logging behavior in multi-threaded environments and the handling of log levels.

Several issues exhibit anomalies, such as users experiencing crashes or unexpected behavior when using asynchronous logging or specific sink configurations. For example, there are reports of segmentation faults when using async loggers on certain platforms, and issues with logger configurations leading to empty log files. These suggest potential areas for improvement in thread safety and error handling.

Issue Details

Most Recently Created Issues

  1. Issue #3168: Q: Start newline every time we are starting the log

    • Priority: Question
    • Status: Open
    • Created: 0 days ago
  2. Issue #3167: spdlog example project doesn't work when built with Visual Studio 2022 and run on Windows 7

    • Priority: Bug
    • Status: Open
    • Created: 0 days ago
  3. Issue #3166: converting UCN to execution character set: Invalid or incomplete multibyte or wide character

    • Priority: Bug
    • Status: Open
    • Created: 0 days ago
  4. Issue #3101: MDC ignores SPDLOG_NO_TLS

    • Priority: Bug
    • Status: Open
    • Created: 100 days ago
    • Updated: 5 days ago
  5. Issue #3146: For non-SPDLOG_HEADER_ONLY builds enable export attributes for symbols

    • Priority: Enhancement
    • Status: Open
    • Created: 42 days ago

Important Issues

  • Issue #3101 (MDC ignores SPDLOG_NO_TLS)

    • This issue has been acknowledged by multiple users and is significant because it affects systems where thread-local storage is not available.
  • Issue #3167 (spdlog example project doesn't work with Visual Studio 2022)

    • This highlights compatibility issues with newer development environments that may affect user adoption.
  • Issue #3166 (Invalid or incomplete multibyte or wide character)

    • This indicates a potential problem with character encoding that could affect internationalization efforts.

Summary of Themes and Commonalities

  • Compatibility with newer versions of the fmt library is a recurring theme, especially with fmt 10.x.
  • Multi-threading and asynchronous logging present challenges, as evidenced by reports of crashes and unexpected behavior.
  • Users are actively seeking ways to customize logging behavior, including log formatting and handling specific log levels dynamically.
  • There is a noticeable demand for better documentation regarding advanced features like custom sinks and logger configurations.

This analysis reflects ongoing challenges within the spdlog community while also highlighting active engagement from users seeking solutions to their logging needs.

Report On: Fetch pull requests



Report on Pull Requests

Overview

The analysis covers a total of 10 open pull requests (PRs) from the gabime/spdlog repository, focusing on various enhancements, bug fixes, and feature additions. The PRs reflect ongoing development efforts aimed at improving functionality, performance, and compatibility of the spdlog logging library.

Summary of Pull Requests

Open Pull Requests

  • PR #3128: V2.x - Attribute support
    Created by Felix Bruns, this PR introduces attribute support for logging, allowing context to be associated with a logger instance rather than a thread. It addresses the limitations of the existing Mapped Diagnostic Context (MDC) by providing a per-logger attribute map. Notably, it raises concerns about potential race conditions when multiple threads log simultaneously.

  • PR #3157: Initialize function-local static variables using "T& t = *new T"
    Proposed by Lixingcong, this PR aims to improve the initialization of static objects to prevent segmentation faults. However, it has led to memory leak issues that need addressing.

  • PR #3155: android: Support __android_log_write_log_message based logging
    Jaroslaw Pelczar's PR adds support for a new Android logging API introduced in API Level 30. The implementation is marked by concerns over code complexity due to conditional compilation directives.

  • PR #3132: Clear previous background color for win32 console before setting new one
    Alexey Sinitskikh proposes changes to ensure that the background color in the Win32 console is reset appropriately before applying new settings. The necessity of this change was questioned by Gabi Melman.

  • PR #3017: Added relay_sink
    This PR introduces a relay_sink that allows rerouting log messages from multiple loggers through a single logger instance. It is particularly useful for applications using DLLs.

  • PR #2935: async_msg: take ownership of filename/funcname
    Tim Blechmann's PR addresses issues with async logging where filename and function name pointers may become invalid. It introduces an API to take ownership of these strings.

  • PR #2895: Hide non-API functions
    Uri Simchoni's PR proposes hiding non-API functions in shared library builds to improve encapsulation and reduce symbol export clutter.

  • PR #2819: implemented async_logger::sync() to solve issue #1696
    This PR allows users to wait for the completion of logging in asynchronous contexts, ensuring that log messages are processed before proceeding.

  • PR #2729: Adding minute_file_sink_mt
    Proposed by mmanoj, this PR introduces a sink for logging that rotates files every minute. It has faced scrutiny regarding its implementation logic and naming conventions.

  • PR #2667: Using std::source_location
    Gianluca Martino's PR seeks to integrate C++20's std::source_location into spdlog, enhancing debugging capabilities but introducing potential breaking changes.

Analysis of Pull Requests

The current set of open pull requests showcases a variety of enhancements aimed at improving both the functionality and usability of the spdlog library. A recurring theme across several PRs is the introduction of new features that enhance logging capabilities in multi-threaded environments. For instance, PR #3128 focuses on adding attribute support which allows contextual information to be logged without being tied to specific threads. This is particularly relevant for applications that handle multiple concurrent requests, such as web servers.

However, this enhancement also brings forth concerns regarding race conditions when multiple threads interact with shared loggers. The discussions around this PR highlight a philosophical dilemma within logging libraries—whether to prioritize thread-local storage or logger-instance-based context management. This indicates an ongoing need for careful consideration of concurrency issues in logging frameworks.

Another notable aspect is the introduction of new sinks and enhancements aimed at specific platforms or use cases, such as the Android logging support in PR #3155 and the minute file sink in PR #2729. These additions reflect an active effort to make spdlog more versatile across different environments while catering to specific user needs.

The presence of unresolved issues related to memory management in PR #3157 and potential complexity introduced by conditional compilation in PR #3155 suggests that while feature expansion is critical, it must be balanced against maintainability and performance considerations. For example, Lixingcong's approach to initializing static variables has led to memory leaks, indicating that developers must remain vigilant about resource management as they implement new features.

Moreover, there are indications of community engagement and feedback loops within these discussions. Comments from contributors like Gabi Melman provide insights into best practices while also raising questions about implementation details—this collaborative environment is essential for refining proposals before merging them into the main branch.

In conclusion, while there is significant progress reflected in these pull requests, challenges around concurrency management, memory safety, and code complexity remain prevalent. The active discussions surrounding these topics suggest a healthy level of scrutiny and collaboration among contributors, which is vital for maintaining the quality and performance standards expected from a widely-used logging library like spdlog.

Report On: Fetch commits



Repo Commits Analysis

Development Team and Recent Activity

Team Members and Recent Contributions

  1. Eugene Smirnov (esmirno)

    • Recent Activity:
    • 11 days ago, addressed a compilation error with GCC 8.5 related to [-Werror=suggest-override].
    • Changes made to ansicolor_sink.h and base_sink.h with a total of 10 lines modified (5 added, 5 removed).
    • Opened a pull request that was merged.
  2. zjyhjqs

    • Recent Activity:
    • 46 days ago, fixed MSVC-specific settings by enabling /Zc:__cplusplus and addressing /MP warnings for clang-cl.
  3. Alex Overchenko (AJIOB)

    • Recent Activity:
    • 52 days ago, worked on fixing build issues with FMT_ENFORCE_COMPILE_STRING.
  4. Ziyao (ziyao233)

    • Recent Activity:
    • 60 days ago, made an example compatible with fmt version 11 by marking the format() method as const.
  5. Philippe Vaucher (Silex)

    • Recent Activity:
    • 65 days ago, contributed to customization of syslog_sink.
  6. Dominik Grabiec (DominikGrabiec)

    • Recent Activity:
    • 108 days ago, added wide character formatting support for wincolor_sink.
  7. Gabi Melman (gabime)

    • Recent Activity:
    • Multiple contributions over the past months including updating documentation, fixing bugs, and enhancing features such as Mapped Diagnostic Context (MDC) support.
    • Last significant activity noted was approximately 129 days ago with multiple updates related to MDC examples and spdlog version updates.

Patterns and Themes

  • Activity Concentration: The most recent activity is primarily from Eugene Smirnov, indicating a focused effort on resolving specific compilation issues.
  • Collaboration: There is evidence of collaboration among team members, particularly in fixing bugs and enhancing features, as seen in the contributions related to MSVC settings and fmt compatibility.
  • Feature Enhancements vs. Bug Fixes: Recent commits show a balance between fixing bugs (e.g., compilation errors) and enhancing existing features (e.g., syslog customization).
  • Long-Term Maintenance: Gabi Melman's ongoing contributions suggest a commitment to maintaining the project’s health through regular updates and documentation improvements.

Conclusions

The development team is actively engaged in both bug fixes and feature enhancements, with Eugene Smirnov leading recent efforts. The team's collaborative nature is evident in their contributions, which focus on improving compatibility and performance across different platforms. Overall, the project appears to be well-maintained with a clear focus on addressing both immediate issues and long-term enhancements.