Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
E

easyloggingpp

> 数据库
Open source

C++ logging library. It is powerful, supports asynchronous low latency, extendable, light-weight, fast performing, thread and type safe and consists of many bui

3.9K stars0 likes2 views
WebsiteGitHub

About

C++ logging library. It is powerful, supports asynchronous low latency, extendable, light-weight, fast performing, thread and type safe and consists of many bui

﷽

![banner]

ARCHIVE NOTICE

⚠️ This project is archived and no longer actively maintained.

Easylogging++ has been a labor of love from 2012 to 2018, and it’s been incredible to see the community embrace it. From embedded systems to desktop applications, this little library made its way into countless projects—many thanks to you, the developers, contributors, and users who helped shape it over the years.

Thank You

To everyone who:

  • Contributed pull requests
  • Reported issues
  • Wrote benchmarks—some comparing limited setups (e.g., without enabling asynchronous logging or multithreading, like Issue #73 on KjellKod/g3log) and others using full feature sets
  • Shared feedback and real-world use cases

Your involvement gave this project purpose and direction.

Now Archived: Consider spdlog for New Projects

While Easylogging++ is still a fully-featured, single-header C++ logging library, I recommend using spdlog or other actively maintained logging libraries for new projects. These libraries continue to evolve and offer better integration, performance, and community support.

No Longer Maintained

Due to other commitments and active projects, I will not be making changes or accepting pull requests going forward.

However, Easylogging++ remains under the permissive MIT License. You are welcome—and encouraged—to fork, customize, or evolve the library as you see fit. This was the exact reason I chose MIT: to empower developers like you with maximum freedom.

Grateful and Humble

It’s been a wonderful ride, and I’m truly humbled by the response this project received. If you’ve used Easylogging++ or learned something from it—thank you.

Feel free to follow my GitHub to stay in the loop with the other projects I’m working on.

Stay curious, keep building.
— Majid Q. (@abumq)


Documentation for v9.97.1

Quick Links

→ Latest Release

→ Changelog

→ Samples


Table of Contents


Overview
    Why yet another library
    Features at a glance
Getting Started
    Download
    Quick Start
    Install (Optional)
    Setting Application Arguments
Configuration
    Level
    Configure
        Using Configuration File
        Using el::Configurations Class
        Using In line Configurations
    Default Configurations
    Global Configurations
    Logging Format Specifiers
    Date/Time Format Specifiers
    Custom Format Specifiers
    Logging Flags
    Application Arguments
    Configuration Macros
    Reading Configurations
Logging
    Basic
    Conditional Logging
    Occasional Logging
    printf Like Logging
    Network Logging
    Verbose Logging
        Basic
        Conditional and Occasional
        Verbose Level
        Check If Verbose Logging Is On
        VModule
    Registering New Loggers
    Unregister Loggers
    Populating Existing Logger IDs
    Sharing Logging Repository
Extra Features
    Performance Tracking
        Conditional Performance Tracking
        Make Use of Performance Tracking Data
    Log File Rotating
    Crash Handling
        Installing Custom Crash Handlers
    Stacktrace
    Multi-threading
    CHECK Macros
    Logging perror()
    Using Syslog
    STL Logging
        Supported Templates
    Qt Logging
    Boost Logging
    wxWidgets Logging
    Extending Library
        Logging Your Own Class
        Logging Third-party Class
    Manually Flushing and Rolling Log Files
    Log Dispatch Callback
    Logger Registration Callback
    Asynchronous Logging
    Helper Classes
Contribution
    Submitting Patches
    Reporting a Bug
Compatibility
    Build Matrix
Licence
Disclaimer

Overview

Easylogging++ is single header efficient logging library for C++ applications. It is extremely powerful, highly extendable and configurable to user's requirements. It provides ability to write your own sinks (via featured referred as LogDispatchCallback). This library is currently used by hundreds of open-source projects on github and other open-source source control management sites.

This manual is for Easylogging++ v9.97.1. For other versions please refer to corresponding release on github.

You may also be interested in Residue logging server.

![top] Goto Top

Why yet another library

If you are working on a small utility or large project in C++, this library can be handy. Its based on single header and only requires to link to single source file. (Originally it was header-only and was changed to use source file in issue #445. You can still use header-only in v9.89).

This library has been designed with various thoughts in mind (i.e, portability, performance, usability, features and easy to setup).

Why yet another library? Well, answer is pretty straight forward, use it as you wrote it so you can fix issues (if any) as you go or raise them on github. In addition to that, I personally have not seen any logging library based on single-header with such a design where you can configure on the go, extend it to your needs and get fast performance. I have seen other single-header logging libraries for C++ but either they use external libraries, e.g, boost or Qt to support certain features like threading, regular expression or date etc. This library has everything built-in to prevent usage of external libraries, not that I don't like those libraries, in fact I love them, but because not all projects use these libraries, I couldn't take risk of depending on them.

![top] Goto Top

Features at a glance

Easylogging++ is feature-rich containing many features that both typical and advanced developer will require while writing a software;

  • Highly configurable
  • Extendable
  • Extremely fast
  • Thread and type safe
  • Cross-platform
  • Custom log patterns
  • Conditional and occasional logging
  • Performance tracking
  • Verbose logging
  • Crash handling
  • Helper CHECK macros
  • STL logging
  • Send to Syslog
  • Third-party library logging (Qt, boost, wxWidgets etc)
  • Extensible (Logging your own class or third-party class)
  • And many more...

![top] Goto Top

Getting Started

Download

Download latest version from Latest Release

For other releases, please visit releases page. If you application does not support C++11, please consider using v8.91. This is stable version for C++98 and C++03, just lack some features.

![top] Goto Top

Quick Start

In order to get started with Easylogging++, you can follow three easy steps:

  • Download latest version
  • Include into your project (easylogging++.h and easylogging++.cc)
  • Initialize using single macro... and off you go!
cpp
#include "easylogging++.h"

INITIALIZE_EASYLOGGINGPP

int main(int argc, char* argv[]) {
   LOG(INFO) << "My first info log using default logger";
   return 0;
}

Now compile using

g++ main.cc easylogging++.cc -o prog -std=c++11

That simple! Please note that INITIALIZE_EASYLOGGINGPP should be used once and once-only otherwise you will end up getting compilation errors. This is the definition of several extern variables. This means it can be defined only once per application. Best place to put this initialization statement is in file where int main(int, char**) function is defined, right after last include statement.

Install (Optional)

If you want to install this header system-wide, you can do so via:

bash
mkdir build
cd build
cmake -Dtest=ON ../
make
make test
make install

Following options are supported by Easylogging++ cmake and you can turn these options on using -D<option>=ON

  • lib_utc_datetime - Defines ELPP_UTC_DATETIME
  • build_static_lib - Builds static library for Easylogging++

With that said, you will still need easylogging++.cc file in order to compile. For header only, please check v9.89 and lower.

Alternatively, you can download and install easyloggingpp using the vcpkg dependency manager:

bash
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install easyloggingpp

The easyloggingpp port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.

![top] Goto Top

Setting Application Arguments

It is al

Issues· 303 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++c-plus-plusc-plus-plus-11cppcrash-handler

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库