بسم الله الرَّحْمَنِ الرَّحِيمِ
![banner]
> **Manual For v9.94.2**
[![Build Status (Develop)](https://img.shields.io/travis/muflihun/easyloggingpp/develop.svg)](https://travis-ci.org/muflihun/easyloggingpp) (`develop`)
[![Build Status (Master)](https://img.shields.io/travis/muflihun/easyloggingpp/master.svg)](https://travis-ci.org/muflihun/easyloggingpp) (`master`)
[![Version](https://img.shields.io/github/release/muflihun/easyloggingpp.svg)](https://github.com/muflihun/easyloggingpp/releases/latest)
[![Canon.io](https://img.shields.io/badge/conan.io-easyloggingpp%2F9.94.2-green.svg?logo=data:image/png;base64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAA1VBMVEUAAABhlctjlstkl8tlmMtlmMxlmcxmmcxnmsxpnMxpnM1qnc1sn85voM91oM11oc1xotB2oc56pNF6pNJ2ptJ8ptJ8ptN9ptN8p9N5qNJ9p9N9p9R8qtOBqdSAqtOAqtR%2BrNSCrNJ/rdWDrNWCsNWCsNaJs9eLs9iRvNuVvdyVv9yXwd2Zwt6axN6dxt%2Bfx%2BChyeGiyuGjyuCjyuGly%2BGlzOKmzOGozuKoz%2BKqz%2BOq0OOv1OWw1OWw1eWx1eWy1uay1%2Baz1%2Baz1%2Bez2Oe02Oe12ee22ujUGwH3AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfgBQkREyOxFIh/AAAAiklEQVQI12NgAAMbOwY4sLZ2NtQ1coVKWNvoc/Eq8XDr2wB5Ig62ekza9vaOqpK2TpoMzOxaFtwqZua2Bm4makIM7OzMAjoaCqYuxooSUqJALjs7o4yVpbowvzSUy87KqSwmxQfnsrPISyFzWeWAXCkpMaBVIC4bmCsOdgiUKwh3JojLgAQ4ZCE0AMm2D29tZwe6AAAAAElFTkSuQmCC)](http://www.conan.io/source/easyloggingpp/9.94.2/memsharded/testing)
[![Try online](https://img.shields.io/badge/try-online-blue.svg)](http://melpon.org/wandbox/permlink/rwDXGcnP1IoCKXrJ)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/muflihun/easyloggingpp/blob/master/LICENCE)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/MuflihunDotCom/25)
[![Downloads](https://img.shields.io/github/downloads/muflihun/easyloggingpp/total.svg)](https://github.com/muflihun/easyloggingpp/releases/latest)
### Quick Links
[![download] Latest Release](https://github.com/muflihun/easyloggingpp/releases/latest)
[![notes] Changelog](/CHANGELOG.md)
[![samples] Samples](/samples)
---
### Table of Contents
<pre>
<a href="#introduction">Introduction</a>
<a href="#why-yet-another-library">Why yet another library</a>
<a href="#features-at-a-glance">Features at a glance</a>
<a href="#getting-started">Getting Started</a>
<a href="#download">Download</a>
<a href="#quick-start">Quick Start</a>
<a href="#install-optional">Install (Optional)</a>
<a href="#setting-application-arguments">Setting Application Arguments</a>
<a href="#configuration">Configuration</a>
<a href="#level">Level</a>
<a href="#configure">Configure</a>
<a href="#using-configuration-file">Using Configuration File</a>
<a href="#using-elconfigurations-class">Using el::Configurations Class</a>
<a href="#using-in-line-configurations">Using In line Configurations</a>
<a href="#default-configurations">Default Configurations</a>
<a href="#global-configurations">Global Configurations</a>
<a href="#logging-format-specifiers">Logging Format Specifiers</a>
<a href="#datetime-format-specifiers">Date/Time Format Specifiers</a>
<a href="#custom-format-specifiers">Custom Format Specifiers</a>
<a href="#logging-flags">Logging Flags</a>
<a href="#application-arguments">Application Arguments</a>
<a href="#configuration-macros">Configuration Macros</a>
<a href="#reading-configurations">Reading Configurations</a>
<a href="#logging">Logging</a>
<a href="#basic">Basic</a>
<a href="#conditional-logging">Conditional Logging</a>
<a href="#occasional-logging">Occasional Logging</a>
<a href="#printf-like-logging">printf Like Logging</a>
<a href="#network-logging">Network Logging</a>
<a href="#verbose-logging">Verbose Logging</a>
<a href="#basic-1">Basic</a>
<a href="#conditional-and-occasional">Conditional and Occasional</a>
<a href="#verbose-level">Verbose Level</a>
<a href="#check-if-verbose-logging-is-on">Check If Verbose Logging Is On</a>
<a href="#vmodule">VModule</a>
<a href="#registering-new-loggers">Registering New Loggers</a>
<a href="#unregister-loggers">Unregister Loggers</a>
<a href="#populating-existing-logger-ids">Populating Existing Logger IDs</a>
<a href="#sharing-logging-repository">Sharing Logging Repository</a>
<a href="#extra-features">Extra Features</a>
<a href="#performance-tracking">Performance Tracking</a>
<a href="#conditional-performance-tracking">Conditional Performance Tracking</a>
<a href="#make-use-of-performance-tracking-data">Make Use of Performance Tracking Data</a>
<a href="#log-file-rotating">Log File Rotating</a>
<a href="#crash-handling">Crash Handling</a>
<a href="#installing-custom-crash-handlers">Installing Custom Crash Handlers</a>
<a href="#stacktrace">Stacktrace</a>
<a href="#multi-threading">Multi-threading</a>
<a href="#check-macros">CHECK Macros</a>
<a href="#logging-perror">Logging perror()</a>
<a href="#syslog">Using Syslog</a>
<a href="#stl-logging">STL Logging</a>
<a href="#supported-templates">Supported Templates</a>
<a href="#qt-logging">Qt Logging</a>
<a href="#boost-logging">Boost Logging</a>
<a href="#wxwidgets-logging">wxWidgets Logging</a>
<a href="#extending-library">Extending Library</a>
<a href="#logging-your-own-class">Logging Your Own Class</a>
<a href="#logging-third-party-class">Logging Third-party Class</a>
<a href="#manually-flushing-and-rolling-log-files">Manually Flushing and Rolling Log Files</a>
<a href="#log-dispatch-callback">Log Dispatch Callback</a>
<a href="#logger-registration-callback">Logger Registration Callback</a>
<a href="#asynchronous-logging">Asynchronous Logging</a>
<a href="#helper-classes">Helper Classes</a>
<a href="#contribution">Contribution</a>
<a href="#submitting-patches">Submitting Patches</a>
<a href="#reporting-a-bug">Reporting a Bug</a>
<a href="#compatibility">Compatibility</a>
<a href="#licence">Licence</a>
<a href="#disclaimer">Disclaimer</a>
</pre>
# Introduction
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](https://github.com/muflihun/easyloggingpp/tree/master/samples/send-to-network) (referred to as `LogDispatchCallback`). Currently used by hundreds of open-source projects.
This manual is for Easylogging++ v9.94.2. For other versions please refer to corresponding [release](https://github.com/muflihun/easyloggingpp/releases) on github.
[![top] Goto Top](#table-of-contents)
### 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](https://github.com/muflihun/easyloggingpp/issues/445). You can still use header-only in [v9.89](https://github.com/muflihun/easyloggingpp/releases/tag/9.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
评论5
最新资源