easyloggingpp-9.96.7/ 0000775 0000000 0000000 00000000000 13376062224 0014503 5 ustar 00root root 0000000 0000000 easyloggingpp-9.96.7/.github/ 0000775 0000000 0000000 00000000000 13376062224 0016043 5 ustar 00root root 0000000 0000000 easyloggingpp-9.96.7/.github/PULL_REQUEST_TEMPLATE.md 0000664 0000000 0000000 00000000403 13376062224 0021641 0 ustar 00root root 0000000 0000000 ### This is a
- [ ] Breaking change
- [ ] New feature
- [ ] Bugfix
### I have
- [ ] Merged in the latest upstream changes
- [ ] Updated [`CHANGELOG.md`](CHANGELOG.md)
- [ ] Updated [`README.md`](README.md)
- [ ] [Run the tests](README.md#install-optional)
easyloggingpp-9.96.7/.gitignore 0000664 0000000 0000000 00000000142 13376062224 0016470 0 ustar 00root root 0000000 0000000 build/*
build-*
*.pro.user
.DS_Store
release.info
bin/*
logs/*
experiments/*
CMakeLists.txt.user*
easyloggingpp-9.96.7/.travis.yml 0000664 0000000 0000000 00000004511 13376062224 0016615 0 ustar 00root root 0000000 0000000 language: cpp
matrix:
include:
# - os: linux
# dist: trusty
# compiler: clang
# before_install:
# - sudo add-apt-repository ppa:kubuntu-ppa/backports -y
# - sudo apt-get -qq update
# - sudo apt-get install -y libgtest-dev valgrind cmake
# - sudo apt-get install --only-upgrade cmake
# - sudo wget https://github.com/google/googletest/archive/release-1.7.0.tar.gz
# - sudo tar xf release-1.7.0.tar.gz
# - cd googletest-release-1.7.0
# - sudo cmake -DBUILD_SHARED_LIBS=ON .
# - sudo make
# - sudo cp -a include/gtest /usr/include
# - sudo cp -a libgtest_main.so libgtest.so /usr/lib/
# - g++ -v
- os: linux
dist: trusty
compiler: gcc
env:
- COMPILER=g++-4.8
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: [g++-4.8, valgrind]
- os: linux
dist: trusty
compiler: gcc
env:
- COMPILER=g++-4.9
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: [g++-4.9, valgrind]
- os: linux
dist: trusty
compiler: gcc
env:
- COMPILER=g++-5
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: [g++-5, valgrind]
- os: linux
dist: trusty
compiler: gcc
env:
- COMPILER=g++-6
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: [g++-6, valgrind]
- os: linux
dist: trusty
compiler: gcc
env:
- COMPILER=g++-7
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: [g++-7, valgrind]
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y libgtest-dev valgrind cmake
- sudo wget https://github.com/google/googletest/archive/release-1.7.0.tar.gz
- sudo tar xf release-1.7.0.tar.gz
- cd googletest-release-1.7.0
- sudo cmake -DBUILD_SHARED_LIBS=ON .
- sudo make
- sudo cp -a include/gtest /usr/include
- sudo cp -a libgtest_main.so libgtest.so /usr/lib/
- which valgrind
- cd "${TRAVIS_BUILD_DIR}"
before_script:
- cd test/
- cmake -Dtest=ON ../
- make
- ls -l
script: "./easyloggingpp-unit-tests -v && cd ../samples/STL && pwd && sh ./.travis_build.sh && valgrind ./bin/very-basic.cpp.bin"
branches:
only:
- master
- develop
notifications:
recipients:
- mkhan3189@gmail.com
email:
on_success: never
on_failure: change
rvm:
- 9.00
easyloggingpp-9.96.7/ACKNOWLEDGEMENTS.md 0000664 0000000 0000000 00000003165 13376062224 0017364 0 ustar 00root root 0000000 0000000 # Acknowledgements
This file contains list of contributors and acknowledgement of their efforts in making this library better especially by making acceptable code changes.
If we have missed your name please feel free to add it with contribution link.
| **Github User** | **Contribution** |
|--------------------------------------|----------------------------------|
| [@aparajita](https://github.com/aparajita) | [Separated out .h and .cc file](https://github.com/muflihun/easyloggingpp/pulls?q=is%3Apr+author%3Aaparajita) |
| [@adah1972](https://github.com/adah1972) | [A lot of contributions](https://github.com/muflihun/easyloggingpp/pulls?q=is%3Apr+author%3Aadah1972) |
| [@miguelmartin75](https://github.com/miguelmartin75) | [Issue #11](https://github.com/muflihun/easyloggingpp/issues/11), [PR #16](https://github.com/muflihun/easyloggingpp/pull/16) |
| [@moneromooo-monero](https://github.com/moneromooo-monero) | [A lot of contributions](https://github.com/muflihun/easyloggingpp/pulls?q=is%3Apr+author%3Amoneromooo-monero)|
| [@MonsieurNicolas](https://github.com/MonsieurNicolas) | [PR #593](https://github.com/muflihun/easyloggingpp/pull/593) |
| [@acowley](https://github.com/acowley) | [PR #593](https://github.com/muflihun/easyloggingpp/pull/577) |
| [@rggjan](https://github.com/rggjan) | [PR 561](https://github.com/muflihun/easyloggingpp/pull/561) |
| [@sgtcodfish](https://github.com/sgtcodfish) | Support for emscripten |
easyloggingpp-9.96.7/CHANGELOG.md 0000664 0000000 0000000 00000010434 13376062224 0016316 0 ustar 00root root 0000000 0000000 # Change Log
## [9.96.7] - 24-11-2018
- Adds support for compiling easyloggingpp using Emscripten. This allows the library to be compiled into Javascript or WebAssembly and run in the browser while logging to the browser's Javascript console.
## [9.96.6] - 24-11-2018
- Storage constructor (indirectly) attempts to access elStorage before it's initialized (issue #660) (@Barteks2x)
- Fixed unused variable warning while build without performance logging feature (@wrgcpp)
- Updated license
## [9.96.5] - 07-09-2018
### Fixes
- Check for level enabled when using custom log message (Advanced) (issue #666)
- Ignore interruption signal crash log
## [9.96.4] - 03-04-2018
### Fixes
- Fixes seg fault with global lock (issue #580)
## [9.96.3] - 01-04-2018
### Fixes
- Demangling in GCC fixed
- `ELPP_NO_DEFAULT_LOG_FILE` now logs to null device on major platforms (windows and unix)
- Fixes unused warnings for constants
## [9.96.2] - 27-02-2018
### Updates
- Dispatcher now passes in pointer to log message instead of creating on the fly
- Introduced new constructor for `Writer` for advanced usage (see muflihun/residue)
- Use `std::unordered_map` for memory management instead of `std::map` issue #611
## [9.96.1] - 23-02-2018
### Fixes
- Two loggers writing to same file is undefined behaviour #613
## [9.96.0] - 14-02-2018
### Fixes
- Potential deadlocks in extreme edge case #609
- Respect `MaxLogFileSize` setting even when `ELPP_NO_DEFAULT_LOG_FILE` is set (@MonsieurNicolas)
- Disable log file **initially** when using `ELPP_NO_LOG_TO_FILE`, to be consistent with documentation (@rggjan)
### Updates
- `el::Storage` no longer contains locks as it should be
- Reformatted both files with `astyle`
- License text updated
### Added
- Install a pkg-config `.pc` file (@acowley)
## [9.95.4] - 10-02-2018
### Fixes
- Fix documentation (see PR#597)
- Fix buffer underflow in getBashOutput (see PR#596)
### Updates
- Added new function `Helpers::reserveCustomFormatSpecifier` (see #606)
- Made `DateTime::buildTimeInfo` public for use
## [9.95.3] - 13-10-2017
### Fixes
- Multithreading issue fixed raised from last release at log builder
## [9.95.2] - 12-06-2017
### Fixes
- Build fix for kFreeBSD as suggested in issue #563
- Fixed issue with deadlock on dispatch (see #571)
- Fixed printf like logging with thread safety (see #572)
### Updates
- Added support for AIX (thanks to @apollo13)
## [9.95.0] - 02-08-2017
### Added
- Added NetBSD as unix [coypoop](https://github.com/muflihun/easyloggingpp/pull/548/commits)
- Ignore `NDEBUG` or `_DEBUG` to determine whether debug logs should be enabled or not. Use `ELPP_DISABLE_DEBUG_LOGS`
### Fixes
- Fix compile when `_USE_32_BIT_TIME_T` defined [gggin](https://github.com/muflihun/easyloggingpp/pull/542/files)
- Fix invalid usage of safeDelete which can cause an error with valgrind [Touyote](https://github.com/muflihun/easyloggingpp/pull/544/files)
- Add code to ensure no nullptr references [tepperly](https://github.com/muflihun/easyloggingpp/pull/512/files)
## [9.94.2] - 12-04-2017
### Added
- CMake option to create static lib (thanks to @romariorios)
- Ability to use UTC time using `ELPP_UTC_DATETIME` (thanks to @romariorios)
- CMake module updated to support static lib
### Changes
- Renamed long format specifiers to full names with padding for readbility
### Fixes
- Fixed Android NDK build (thanks to @MoroccanMalinois)
- Fix `ELPP_DISABLE_LOGS` not working in VS (thanks to @goloap) #365
## [9.94.1] - 25-02-2017
### Fixed
- Fixes for `/W4` level warnings generated in MSVC compile (Thanks to [Falconne](https://github.com/Falconne))
- Fixed links
- Fixes removing default logger if other than `default`
### Changes
- Changed documentation to mention `easylogging++.cc` in introduction and added links to features
## [9.94.0] - 14-02-2017
### Fixed
- Fixed performance tracking time unit and calculations
### Added
- Restored `ELPP_DEFAULT_LOGGER` and `ELPP_DEFAULT_PERFORMANCE_LOGGER`
- `Helpers::getThreadName` for reading current thread name
- Custom format specifier now has to return `std::string` instead
- Merged `thread_name` with `thread` if thread name is available it's used otherwise ID is displayed
For older versions please refer to [https://github.com/muflihun/easyloggingpp/tree/master/doc](https://github.com/muflihun/easyloggingpp/tree/master/doc)
easyloggingpp-9.96.7/CMakeLists.txt 0000664 0000000 0000000 00000006354 13376062224 0017253 0 ustar 00root root 0000000 0000000 cmake_minimum_required(VERSION 2.8.7)
project(Easyloggingpp CXX)
macro(require_cpp11)
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 3.0)
# CMake 3.1 has built-in CXX standard checks.
message("-- Setting C++11")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED on)
else()
if (CMAKE_CXX_COMPILER_ID MATCHES "GCC")
message ("-- GNU CXX (-std=c++11)")
list(APPEND CMAKE_CXX_FLAGS "-std=c++11")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message ("-- CLang CXX (-std=c++11)")
list(APPEND CMAKE_CXX_FLAGS "-std=c++11")
else()
message ("-- Easylogging++ requires C++11. Your compiler does not support it.")
endif()
endif()
endmacro()
option(test "Build all tests" OFF)
option(build_static_lib "Build easyloggingpp as a static library" OFF)
option(lib_utc_datetime "Build library with UTC date/time logging" OFF)
set(ELPP_MAJOR_VERSION "9")
set(ELPP_MINOR_VERSION "96")
set(ELPP_PATCH_VERSION "7")
set(ELPP_VERSION_STRING "${ELPP_MAJOR_VERSION}.${ELPP_MINOR_VERSION}.${ELPP_PATCH_VERSION}")
set(ELPP_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The directory the headers are installed in")
set(ELPP_PKGCONFIG_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
install(FILES
src/easylogging++.h
src/easylogging++.cc
DESTINATION "${ELPP_INCLUDE_INSTALL_DIR}"
COMPONENT dev)
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/easyloggingpp.pc.cmakein
${CMAKE_CURRENT_BINARY_DIR}/easyloggingpp.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/easyloggingpp.pc DESTINATION "${ELPP_PKGCONFIG_INSTALL_DIR}")
if (build_static_lib)
if (lib_utc_datetime)
add_definitions(-DELPP_UTC_DATETIME)
endif()
require_cpp11()
add_library(easyloggingpp STATIC src/easylogging++.cc)
set_property(TARGET easyloggingpp PROPERTY POSITION_INDEPENDENT_CODE ON)
install(TARGETS
easyloggingpp
ARCHIVE DESTINATION lib)
endif()
export(PACKAGE ${PROJECT_NAME})
########################################## Unit Testing ###################################
if (test)
# We need C++11
require_cpp11()
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
find_package (gtest REQUIRED)
include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
enable_testing()
if (EMSCRIPTEN)
set(CMAKE_EXE_LINKER_FLAGS "-O2 -s TOTAL_MEMORY=134217728")
endif()
add_executable(easyloggingpp-unit-tests
src/easylogging++.cc
test/main.cc
)
target_compile_definitions(easyloggingpp-unit-tests PUBLIC
ELPP_FEATURE_ALL
ELPP_LOGGING_FLAGS_FROM_ARG
ELPP_NO_DEFAULT_LOG_FILE
ELPP_FRESH_LOG_FILE
)
# Standard linking to gtest stuff.
target_link_libraries(easyloggingpp-unit-tests gtest gtest_main)
add_test(NAME easyloggingppUnitTests COMMAND easyloggingpp-unit-tests -v)
endif()
easyloggingpp-9.96.7/LICENSE 0000664 0000000 0000000 00000002250 13376062224 0015507 0 ustar 00root root 0000000 0000000 The MIT License (MIT)
Copyright (c) 2012-2018 Zuhd Web Services
Copyright (c) 2012-2018 @abumusamq
https://github.com/zuhd-org/
https://zuhd.org
https://muflihun.com
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
easyloggingpp-9.96.7/README.md 0000664 0000000 0000000 00000301032 13376062224 0015761 0 ustar 00root root 0000000 0000000
﷽
![banner]
> **Manual For v9.96.7**
[](#build-matrix)
[](#build-matrix)
[](https://ci.appveyor.com/project/abumusamq/easyloggingpp-node)
[](https://github.com/muflihun/easyloggingpp/releases/latest)
[](https://www.npmjs.com/package/easyloggingpp)
[](https://github.com/muflihun/easyloggingpp/blob/master/LICENCE)
[](https://github.com/muflihun/easyloggingpp/releases/latest)
[](https://www.paypal.me/zuhd/25)
### Quick Links
[![download] Latest Release](https://github.com/muflihun/easyloggingpp/releases/latest)
[![notes] Changelog](/CHANGELOG.md)
[![samples] Samples](/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_](/samples/send-to-network) (via featured referred as `LogDispatchCallback`). This library is currently used by [hundreds of open-source projects on github](https://github.com/search?q=%22easylogging%2B%2B.h%22&type=Code&utf8=%E2%9C%93) and other open-source source control management sites.
This manual is for Easylogging++ v9.96.7. For other versions please refer to corresponding [release](https://github.com/muflihun/easyloggingpp/releases) on github.
> You may also be interested in [Residue](https://github.com/muflihun/residue/) logging server.
[![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 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](#table-of-contents)
### 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](#configuration)
* [Extendable](#extending-library)
* Extremely fast
* [Thread](#multi-threading) and type safe
* [Cross-platform](#compatibility)
* [Custom log patterns](#logging-format-specifiers)
* [Conditional and occasional logging](#conditional-logging)
* [Performance tracking](#performance-tracking)
* [Verbose logging](#verbose-logging)
* [Crash handling](#crash-handling)
* [Helper CHECK macros](#check-macros)
* [STL logging](#stl-logging)
* [Send to Syslog](#syslog)
* [Third-party library logging (Qt, boost, wxWidgets etc)](#logging-third-party-class)
* [Extensible (Logging your own class or third-party class)](#logging-your-own-class)
* [And many more...](#extra-features)
[![top] Goto Top](#table-of-contents)
# Getting Started
### Download
Download latest version from [Latest Release](https://github.com/muflihun/easyloggingpp/releases/latest)
For other releases, please visit [releases page](https://github.com/muflihun/easyloggingpp/releases). If you application does not support C++11, please consider using [v8.91](https://github.com/muflihun/easyloggingpp/tree/v8.91). This is stable version for C++98 and C++03, just lack some features.
[![top] Goto Top](#table-of-contents)
### 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!
```c++
#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 definiting 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:
```
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=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](https://github.com/muflihun/easyloggingpp/releases/tag/9.89) and lower.
[![top] Goto Top](#table-of-contents)
### Setting Application Arguments
It is always recommended to pass application arguments to Easylogging++. Some features of Easylogging++ require you to set application arguments, e.g, verbose logging to set verbose level or vmodules (explained later). In order to do that you can use helper macro or helper class;
```c++
int main(int argc, char* argv[]) {
START_EASYLOGGINGPP(argc, argv);
...
}
```
[![top] Goto Top](#table-of-contents)
# Configuration
### Level
In order to start configuring your logging library, you must understand severity levels. Easylogging++ deliberately does not use hierarchical logging in order to fully control what's enabled and what's not. That being said, there is still option to use hierarchical logging using `LoggingFlag::HierarchicalLogging`. Easylogging++ has following levels (ordered for hierarchical levels)
| Level | Description |
|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Global | Generic level that represents all levels. Useful when setting global configuration for all levels. |
| Trace | Information that can be useful to back-trace certain events - mostly useful than debug logs. |
| Debug | Informational events most useful for developers to debug application. Only applicable if NDEBUG is not defined (for non-VC++) or _DEBUG is defined (for VC++).|
| Fatal | Very severe error event that will presumably lead the application to abort. |
| Error | Error information but will continue application to keep running. |
| Warning | Information representing errors in application but application will keep running. |
| Info | Mainly useful to represent current progress of application. |
| Verbose | Information that can be highly useful and vary with verbose logging level. Verbose logging is not applicable to hierarchical logging. |
| Unknown | Only applicable to hierarchical logging and is used to turn off logging completely. |
[![top] Goto Top](#table-of-contents)
### Configure
Easylogging++ is easy to configure. There are three possible ways to do so,
* Using configuration file
* Using el::Configurations class
* Using inline configuration
#### Using Configuration File
Configuration can be done by file that is loaded at runtime by `Configurations` class. This file has following format;
```
* LEVEL:
CONFIGURATION NAME = "VALUE" ## Comment
ANOTHER CONFIG NAME = "VALUE"
```
Level name starts with a star (*) and ends with colon (:). It is highly recommended to start your configuration file with `Global` level so that any configuration not specified in the file will automatically use configuration from `Global`. For example, if you set `Filename` in `Global` and you want all the levels to use same filename, do not set it explicitly for each level, library will use configuration value from `Global` automatically.
Following table contains configurations supported by configuration file.
| Configuration Name | Type | Description |
|-----------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `Enabled` | bool | Determines whether or not corresponding level for logger is enabled. You may disable all logs by using `el::Level::Global` |
| `To_File` | bool | Whether or not to write corresponding log to log file |
| `To_Standard_Output` | bool | Whether or not to write logs to standard output e.g, terminal or command prompt |
| `Format` | char* | Determines format/pattern of logging for corresponding level and logger. |
| `Filename` | char* | Determines log file (full path) to write logs to for corresponding level and logger |
| `Subsecond_Precision` | uint | Specifies subsecond precision (previously called 'milliseconds width'). Width can be within range (1-6) |
| `Performance_Tracking` | bool | Determines whether or not performance tracking is enabled. This does not depend on logger or level. Performance tracking always uses 'performance' logger unless specified|
| `Max_Log_File_Size` | size_t | If log file size of corresponding level is >= specified size, log file will be truncated. |
| `Log_Flush_Threshold` | size_t | Specifies number of log entries to hold until we flush pending log data |
Please do not use double-quotes anywhere in comment, you might end up in unexpected behaviour.
Sample Configuration File
```
* GLOBAL:
FORMAT = "%datetime %msg"
FILENAME = "/tmp/logs/my.log"
ENABLED = true
TO_FILE = true
TO_STANDARD_OUTPUT = true
SUBSECOND_PRECISION = 6
PERFORMANCE_TRACKING = true
MAX_LOG_FILE_SIZE = 2097152 ## 2MB - Comment starts with two hashes (##)
LOG_FLUSH_THRESHOLD = 100 ## Flush after every 100 logs
* DEBUG:
FORMAT = "%datetime{%d/%M} %func %msg"
```
##### Explanation
Configuration file contents in above sample is straightforward. We start with `GLOBAL` level in order to override all the levels. Any explicitly defined subsequent level will override configuration from `GLOBAL`. For example, all the levels except for `DEBUG` have the same format, i.e, datetime and log message. For `DEBUG` level, we have only date (with day and month), source function and log message. The rest of configurations for `DEBUG` are used from `GLOBAL`. Also, notice `{%d/%M}` in `DEBUG` format above, if you do not specify date format, default format is used. Default values of date/time is `%d/%M/%Y %h:%m:%s,%g` For more information on these format specifiers, please refer to [Date/Time Format Specifier](#datetime-format-specifiers) section below
##### Usage
```c++
#include "easylogging++.h"
INITIALIZE_EASYLOGGINGPP
int main(int argc, const char** argv) {
// Load configuration from file
el::Configurations conf("/path/to/my-conf.conf");
// Reconfigure single logger
el::Loggers::reconfigureLogger("default", conf);
// Actually reconfigure all loggers instead
el::Loggers::reconfigureAllLoggers(conf);
// Now all the loggers will use configuration from file
}
```
> Your configuration file can be converted to `el::Configurations` object (using constructor) that can be used where ever it is needed (like in above example).
[![top] Goto Top](#table-of-contents)
#### Using el::Configurations Class
You can set configurations or reset configurations;
```c++
#include "easylogging++.h"
INITIALIZE_EASYLOGGINGPP
int main(int argc, const char** argv) {
el::Configurations defaultConf;
defaultConf.setToDefault();
// Values are always std::string
defaultConf.set(el::Level::Info,
el::ConfigurationType::Format, "%datetime %level %msg");
// default logger uses default configurations
el::Loggers::reconfigureLogger("default", defaultConf);
LOG(INFO) << "Log using default file";
// To set GLOBAL configurations you may use
defaultConf.setGlobally(
el::ConfigurationType::Format, "%date %msg");
el::Loggers::reconfigureLogger("default", defaultConf);
return 0;
}
```
> Configuration just needs to be set once. If you are happy with default configuration, you may use it as well.
[![top] Goto Top](#table-of-contents)
#### Using In line Configurations
Inline configuration means you can set configurations in `std::string` but make sure you add all the new line characters etc. This is not recommended because it's always messy.
```c++
el::Configurations c;
c.setToDefault();
c.parseFromText("*GLOBAL:\n FORMAT = %level %msg");
```
> Above code only sets Configurations object, you still need to re-configure logger/s using this configurations.
[![top] Goto Top](#table-of-contents)
### Default Configurations
If you wish to have a configuration for existing and future loggers, you can use `el::Loggers::setDefaultConfigurations(el::Configurations& configurations, bool configureExistingLoggers = false)`. This is useful when you are working on fairly large scale, or using a third-party library that is already using Easylogging++. Any newly created logger will use default configurations. If you wish to configure existing loggers as well, you can set second argument to `true` (it defaults to `false`).
[![top] Goto Top](#table-of-contents)
### Global Configurations
`Level::Global` is nothing to do with global configurations, it is concept where you can register configurations for all/or some loggers and even register new loggers using configuration file. Syntax of configuration file is:
```
-- LOGGER ID ## Case sensitive
## Everything else is same as configuration file
-- ANOTHER LOGGER ID
## Configuration for this logger
```
Logger ID starts with two dashes. Once you have written your global configuration file you can configure your all loggers (and register new ones) using single function;
```c++
int main(void) {
// Registers new and configures it or
// configures existing logger - everything in global.conf
el::Loggers::configureFromGlobal("global.conf");
// .. Your prog
return 0;
}
```
Please note, it is not possible to register new logger using global configuration without defining its configuration. You must define at least single configuration. Other ways to register loggers are discussed in [Logging](#logging) section below.
[![top] Goto Top](#table-of-contents)
### Logging Format Specifiers
You can customize format of logging using following specifiers:
| Specifier | Replaced By |
|-----------------|---------------------------------------------------------------------------------------------|
| `%logger` | Logger ID |
| `%thread` | Thread ID - Uses std::thread if available, otherwise GetCurrentThreadId() on windows |
| `%thread_name` | Use `Helpers::setThreadName` to set name of current thread (where you run `setThreadName` from). See [Thread Names sample](/samples/STL/thread-names.cpp)|
| `%level` | Severity level (Info, Debug, Error, Warning, Fatal, Verbose, Trace) |
| `%levshort` | Severity level (Short version i.e, I for Info and respectively D, E, W, F, V, T) |
| `%vlevel` | Verbosity level (Applicable to verbose logging) |
| `%datetime` | Date and/or time - Pattern is customizable - see Date/Time Format Specifiers below |
| `%user` | User currently running application |
| `%host` | Computer name application is running on |
| `%file`* | File name of source file (Full path) - This feature is subject to availability of `__FILE__` macro of compiler |
| `%fbase`* | File name of source file (Only base name) |
| `%line`* | Source line number - This feature is subject to availability of `__LINE__` macro of compile |
| `%func`* | Logging function |
| `%loc`* | Source filename and line number of logging (separated by colon) |
| `%msg` | Actual log message |
| `%` | Escape character (e.g, %%level will write %level) |
* Subject to compiler's availability of certain macros, e.g, `__LINE__`, `__FILE__` etc
[![top] Goto Top](#table-of-contents)
### Date/Time Format Specifiers
You can customize date/time format using following specifiers
| Specifier | Replaced By |
|-----------------|------------------------------------------------------------------------------------------------------------------|
| `%d` | Day of month (zero-padded) |
| `%a` | Day of the week - short (Mon, Tue, Wed, Thu, Fri, Sat, Sun) |
| `%A` | Day of the week - long (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday) |
| `%M` | Month (zero-padded) |
| `%b` | Month - short (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec) |
| `%B` | Month - Long (January, February, March, April, May, June, July, August, September, October, November, December) |
| `%y` | Year - Two digit (13, 14 etc) |
| `%Y` | Year - Four digit (2013, 2014 etc) |
| `%h` | Hour (12-hour format) |
| `%H` | Hour (24-hour format) |
| `%m` | Minute (zero-padded) |
| `%s` | Second (zero-padded) |
| `%g` | Subsecond part (precision is configured by ConfigurationType::SubsecondPrecision) |
| `%F` | AM/PM designation |
| `%` | Escape character |
Please note, date/time is limited to `30` characters at most.
[![top] Goto Top](#table-of-contents)
### Custom Format Specifiers
You can also specify your own format specifiers. In order to do that you can use `el::Helpers::installCustomFormatSpecifier`. A perfect example is `%ip_addr` for TCP server application;
```C++
const char* getIp(void) {
return "192.168.1.1";
}
int main(void) {
el::Helpers::installCustomFormatSpecifier(el::CustomFormatSpecifier("%ip_addr", getIp));
el::Loggers::reconfigureAllLoggers(el::ConfigurationType::Format, "%datetime %level %ip_addr : %msg");
LOG(INFO) << "This is request from client";
return 0;
}
```
[![top] Goto Top](#table-of-contents)
### Logging Flags
Form some parts of logging you can set logging flags; here are flags supported:
| Flag | Description |
|--------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
| `NewLineForContainer (1)` | Makes sure we have new line for each container log entry |
| `AllowVerboseIfModuleNotSpecified (2)` | Makes sure if -vmodule is used and does not specifies a module, then verbose logging is allowed via that module. Say param was -vmodule=main*=3 and a verbose log is being written from a file called something.cpp then if this flag is enabled, log will be written otherwise it will be disallowed. Note: having this defeats purpose of -vmodule |
| `LogDetailedCrashReason (4)` | When handling crashes by default, detailed crash reason will be logged as well (Disabled by default) ([issue #90](https://github.com/muflihun/easyloggingpp/issues/90)) |
| `DisableApplicationAbortOnFatalLog (8)` | Allows to disable application abortion when logged using FATAL level. Note that this does not apply to default crash handlers as application should be aborted after crash signal is handled. (Not added by default) ([issue #119](https://github.com/muflihun/easyloggingpp/issues/119)) |
| `ImmediateFlush (16)` | Flushes log with every log-entry (performance sensative) - Disabled by default |
| `StrictLogFileSizeCheck (32)` | Makes sure log file size is checked with every log |
| `ColoredTerminalOutput (64)` | Terminal output will be colorful if supported by terminal. |
| `MultiLoggerSupport (128)` | Enables support for using multiple loggers to log single message. (E.g, `CLOG(INFO, "default", "network") << This will be logged using default and network loggers;`) |
| `DisablePerformanceTrackingCheckpointComparison (256)` | Disables checkpoint comparison |
| `DisableVModules (512)` | Disables usage of vmodules
| `DisableVModulesExtensions (1024)` | Disables vmodules extension. This means if you have a vmodule -vmodule=main*=4 it will cover everything starting with main, where as if you do not have this defined you will be covered for any file starting with main and ending with one of the following extensions; .h .c .cpp .cc .cxx .-inl-.h .hxx .hpp. Please note following vmodule is not correct -vmodule=main.=4 with this macro not defined because this will check for main..c, notice double dots. If you want this to be valid, have a look at logging flag above: AllowVerboseIfModuleNotSpecified '?' and '' wildcards are supported |
| `HierarchicalLogging (2048)` | Enables hierarchical logging. This is not applicable to verbose logging.|
| `CreateLoggerAutomatically (4096)` | Creates logger automatically when not available. |
| `AutoSpacing (8192)` | Automatically adds spaces. E.g, `LOG(INFO) << "DODGE" << "THIS!";` will output "DODGE THIS!"|
| `FixedTimeFormat (16384)` | Applicable to performace tracking only - this prevents formatting time. E.g, `1001 ms` will be logged as is, instead of formatting it as `1.01 sec`|
| `IgnoreSigInt (32768)` | When application crashes ignore Interruption signal |
You can set/unset these flags by using static `el::Loggers::addFlag` and `el::Loggers::removeFlag`. You can check to see if certain flag is available by using `el::Loggers::hasFlag`, all these functions take strongly-typed enum `el::LoggingFlag`
> You can set these flags by using `--logging-flags` command line arg. You need to enable this functionality by defining macro `ELPP_LOGGING_FLAGS_FROM_ARG` (You will need to make sure to use `START_EASYLOGGINGPP(argc, argv)` to configure arguments).
> You can also set default (initial) flags using `ELPP_DEFAULT_LOGGING_FLAGS` and set numerical value for initial flags
[![top] Goto Top](#table-of-contents)
### Application Arguments
Following table will explain all command line arguments that you may use to define certain behaviour; You will need to initialize application arguments by using `START_EASYLOGGINGPP(argc, argv)` in your `main(int, char**)` function.
| Argument | Description |
|----------------------------|-----------------------------------------------------------------------------------------|
| `-v` | Activates maximum verbosity |
| `--v=2` | Activates verbosity upto verbose level 2 (valid range: 0-9) |
| `--verbose` | Activates maximum verbosity |
| `-vmodule=MODULE_NAME` | Activates verbosity for files starting with main to level 1, the rest of the files depend on logging flag `AllowVerboseIfModuleNotSpecified` Please see Logging Flags section above. Two modules can be separated by comma. Please note vmodules are last in order of precedence of checking arguments for verbose logging, e.g, if we have -v in application arguments before vmodules, vmodules will be ignored. |
| `--logging-flags=3` | Sets logging flag. In example `i.e, 3`, it sets logging flag to `NewLineForContainer` and `AllowVerboseIfModuleNotSpecified`. See logging flags section above for further details and values. See macros section to disable this function. |
| `--default-log-file=FILE` |Sets default log file for existing and future loggers. You may want to consider defining `ELPP_NO_DEFAULT_LOG_FILE` to prevent creation of default empty log file during pre-processing. See macros section to disable this function. |
[![top] Goto Top](#table-of-contents)
### Configuration Macros
Some of logging options can be set by macros, this is a thoughtful decision, for example if we have `ELPP_THREAD_SAFE` defined, all the thread-safe functionalities are enabled otherwise disabled (making sure over-head of thread-safety goes with it). To make it easy to remember and prevent possible conflicts, all the macros start with `ELPP_`
**NOTE:** All the macros can be defined in one of the following ways:
1. Define macros using `-D` option of compiler, for example in case of `g++` you will do `g++ source.cpp ... -DELPP_SYSLOG -DELPP_THREAD_SAFE ...` (**recommended way**)
2. Define macros inside `"easylogging++.h"` ([defining macros in other files won't work](https://github.com/muflihun/easyloggingpp/issues/590#issuecomment-346753951))
| Macro Name | Description |
|------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
| `ELPP_DEBUG_ASSERT_FAILURE` | Aborts application on first assertion failure. This assertion is due to invalid input e.g, invalid configuration file etc. |
| `ELPP_UNICODE` | Enables Unicode support when logging. Requires `START_EASYLOGGINGPP` |
| `ELPP_THREAD_SAFE` | Enables thread-safety - make sure -lpthread linking for linux. |
| `ELPP_FORCE_USE_STD_THREAD` | Forces to use C++ standard library for threading (Only useful when using `ELPP_THREAD_SAFE` |
| `ELPP_FEATURE_CRASH_LOG` | Applicable to GCC only. Enables stacktrace on application crash |
| `ELPP_DISABLE_DEFAULT_CRASH_HANDLING` | Disables default crash handling. You can use el::Helpers::setCrashHandler to use your own handler. |
| `ELPP_DISABLE_LOGS` | Disables all logs - (preprocessing) |
| `ELPP_DISABLE_DEBUG_LOGS` | Disables debug logs - (preprocessing) |
| `ELPP_DISABLE_INFO_LOGS` | Disables info logs - (preprocessing) |
| `ELPP_DISABLE_WARNING_LOGS` | Disables warning logs - (preprocessing) |
| `ELPP_DISABLE_ERROR_LOGS` | Disables error logs - (preprocessing) |
| `ELPP_DISABLE_FATAL_LOGS` | Disables fatal logs - (preprocessing) |
| `ELPP_DISABLE_VERBOSE_LOGS` | Disables verbose logs - (preprocessing) |
| `ELPP_DISABLE_TRACE_LOGS` | Disables trace logs - (preprocessing) |
| `ELPP_FORCE_ENV_VAR_FROM_BASH` | If environment variable could not be found, force using alternative bash command to find value, e.g, `whoami` for username. (DO NOT USE THIS MACRO WITH `LD_PRELOAD` FOR LIBRARIES THAT ARE ALREADY USING Easylogging++ OR YOU WILL END UP IN STACK OVERFLOW FOR PROCESSES (`popen`) (see [issue #87](https://github.com/muflihun/easyloggingpp/issues/87) for details)) |
| `ELPP_DEFAULT_LOG_FILE` | Full filename where you want initial files to be created. You need to embed value of this macro with quotes, e.g, `-DELPP_DEFAULT_LOG_FILE='"logs/el.gtest.log"'` Note the double quotes inside single quotes, double quotes are the values for `const char*` and single quotes specifies value of macro |
| `ELPP_NO_LOG_TO_FILE` | Disable logging to file initially|
| `ELPP_NO_DEFAULT_LOG_FILE` | If you dont want to initialize library with default log file, define this macro. This will log to null device for unix and windows. In other platforms you may get error and you will need to use `ELPP_DEFAULT_LOG_FILE`. (PR for other platform's null devices are most welcomed) |
| `ELPP_FRESH_LOG_FILE` | Never appends log file whenever log file is created (Use with care as it may cause some unexpected result for some users) |
| `ELPP_DEBUG_ERRORS` | If you wish to find out internal errors raised by Easylogging++ that can be because of configuration or something else, you can enable them by defining this macro. You will get your errors on standard output i.e, terminal or command prompt. |
| `ELPP_DISABLE_CUSTOM_FORMAT_SPECIFIERS` | Forcefully disables custom format specifiers |
| `ELPP_DISABLE_LOGGING_FLAGS_FROM_ARG` | Forcefully disables ability to set logging flags using command-line arguments |
| `ELPP_DISABLE_LOG_FILE_FROM_ARG` | Forcefully disables ability to set default log file from command-line arguments |
| `ELPP_WINSOCK2` | On windows system force to use `winsock2.h` instead of `winsock.h` when `WIN32_LEAN_AND_MEAN` is defined |
| `ELPP_CUSTOM_COUT` (advanced) | Resolves to a value e.g, `#define ELPP_CUSTOM_COUT qDebug()` or `#define ELPP_CUSTOM_COUT std::cerr`. This will use the value for standard output (instead of using `std::cout`|
| `ELPP_CUSTOM_COUT_LINE` (advanced) | Used with `ELPP_CUSTOM_COUT` to define how to write a log line with custom cout. e.g, `#define ELPP_CUSTOM_COUT_LINE(msg) QString::fromStdString(msg).trimmed()` |
| `ELPP_NO_CHECK_MACROS` | Do not define the *CHECK* macros |
| `ELPP_NO_DEBUG_MACROS` | Do not define the *DEBUG* macros |
| `ELPP_UTC_DATETIME` | Uses UTC time instead of local time (essentially uses `gmtime` instead of `localtime` and family functions)
| `ELPP_NO_GLOBAL_LOCK` | Do not lock the whole storage on dispatch. This should be used with care. See [issue #580](https://github.com/muflihun/easyloggingpp/issues/580)|
[![top] Goto Top](#table-of-contents)
### Reading Configurations
If you wish to read configurations of certain logger, you can do so by using `typedConfigurations()` function in Logger class.
```c++
el::Logger* l = el::Loggers::getLogger("default");
bool enabled = l->typedConfigurations()->enabled(el::Level::Info);
// Or to read log format/pattern
std::string format =
l->typedConfigurations()->logFormat(el::Level::Info).format();
```
[![top] Goto Top](#table-of-contents)
# Logging
Logging in easylogging++ is done using collection of macros. This is to make it easier for user and to prevent them knowing about unnecessary greater details of how things are done.
### Basic
You are provided with two basic macros that you can use in order to write logs:
* `LOG(LEVEL)`
* `CLOG(LEVEL, logger ID)`
`LOG` uses 'default' logger while in CLOG (Custom LOG) you specify the logger ID. For LEVELs please refer to Configurations - Levels section above. Different loggers might have different configurations depending on your need, you may as well write custom macro to access custom logger. You also have different macros for verbose logging that is explained in section below.
Here is very simple example of using these macros after you have initialized easylogging++.
```c++
LOG(INFO) << "This is info log";
CLOG(ERROR, "performance") << "This is info log using performance logger";
```
There is another way to use same macro i.e, `LOG` (and associated macros). This is that you define macro `ELPP_DEFAULT_LOGGER` and `ELPP_DEFAULT_PERFORMANCE_LOGGER` with logger ID that is already registered, and now when you use `LOG` macro, it automatically will use specified logger instead of `default` logger. Please note that this should be defined in source file instead of header file. This is so that when we include header we dont accidently use invalid logger.
A quick example is here
```c++
#ifndef ELPP_DEFAULT_LOGGER
# define ELPP_DEFAULT_LOGGER "update_manager"
#endif
#ifndef ELPP_DEFAULT_PERFORMANCE_LOGGER
# define ELPP_DEFAULT_PERFORMANCE_LOGGER ELPP_DEFAULT_LOGGER
#endif
#include "easylogging++.h"
UpdateManager::UpdateManager {
_TRACE; // Logs using LOG(TRACE) provided logger is already registered - i.e, update_manager
LOG(INFO) << "This will log using update_manager logger as well";
}
```
```c++
#include "easylogging++.h"
UpdateManager::UpdateManager {
_TRACE; // Logs using LOG(TRACE) using default logger because no `ELPP_DEFAULT_LOGGER` is defined unless you have it in makefile
}
```
> You can also write logs by using `Logger` class directly. This feature is available on compilers that support variadic templates. You can explore more by looking at `samples/STL/logger-log-functions.cpp`.
[![top] Goto Top](#table-of-contents)
### Conditional Logging
Easylogging++ provides certain aspects of logging, one these aspects is conditional logging, i.e, log will be written only if certain condition fulfils. This comes very handy in some situations.
Helper macros end with _IF;
* `LOG_IF(condition, LEVEL)`
* `CLOG_IF(condition, LEVEL, logger ID)`
#### Some examples:
```c++
LOG_IF(condition, INFO) << "Logged if condition is true";
LOG_IF(false, WARNING) << "Never logged";
CLOG_IF(true, INFO, "performance") << "Always logged (performance logger)"
```
Same macros are available for verbose logging with `V` in the beginning, i.e, `VLOG_IF` and `CVLOG_IF`. see verbose logging section below for further information. You may have as complicated conditions as you want depending on your need.
[![top] Goto Top](#table-of-contents)
### Occasional Logging
Occasional logging is another useful aspect of logging with Easylogging++. This means a log will be written if it's hit certain times or part of certain times, e.g, every 10th hit or 100th hit or 2nd hit.
Helper macros end with `_EVERY_N`;
* `LOG_EVERY_N(n, LEVEL)`
* `CLOG_EVERY_N(n, LEVEL, logger ID)`
#### Other Hit Counts Based Logging
There are some other ways of logging as well based on hit counts. These useful macros are
* `LOG_AFTER_N(n, LEVEL)`; Only logs when we have reached hit counts of `n`
* `LOG_N_TIMES(n, LEVEL)`; Logs n times
#### Some examples:
```c++
for (int i = 1; i <= 10; ++i) {
LOG_EVERY_N(2, INFO) << "Logged every second iter";
}
// 5 logs written; 2, 4, 6, 7, 10
for (int i = 1; i <= 10; ++i) {
LOG_AFTER_N(2, INFO) << "Log after 2 hits; " << i;
}
// 8 logs written; 3, 4, 5, 6, 7, 8, 9, 10
for (int i = 1; i <= 100; ++i) {
LOG_N_TIMES(3, INFO) << "Log only 3 times; " << i;
}
// 3 logs writter; 1, 2, 3
```
> Same versions of macros are available for `DEBUG` only mode, these macros start with `D` (for debug) followed by the same name. e.g, `DLOG` to log only in debug mode (i.e, when `_DEBUG` is defined or `NDEBUG` is undefined)
[![top] Goto Top](#table-of-contents)
### `printf` Like Logging
For compilers that support C++11's variadic templates, ability to log like "printf" is available. This is done by using `Logger` class. This feature is thread and type safe (as we do not use any macros like `LOG(INFO)` etc)
This is done in two steps:
1. Pulling registered logger using `el::Loggers::getLogger();`
2. Using one of logging functions
The only difference from `printf` is that logging using these functions require `%v` for each arg (This is for type-safety); instead of custom format specifiers. You can escape this by `%%v`
Following are various function signatures:
* `info(const char*, const T&, const Args&...)`
* `warn(const char*, const T&, const Args&...)`
* `error(const char*, const T&, const Args&...)`
* `debug(const char*, const T&, const Args&...)`
* `fatal(const char*, const T&, const Args&...)`
* `trace(const char*, const T&, const Args&...)`
* `verbose(int vlevel, const char*, const T&, const Args&...)`
#### Simple example:
```c++
// Use default logger
el::Logger* defaultLogger = el::Loggers::getLogger("default");
// STL logging (`ELPP_STL_LOGGING` should be defined)
std::vector i;
i.push_back(1);
defaultLogger->warn("My first ultimate log message %v %v %v", 123, 222, i);
// Escaping
defaultLogger->info("My first ultimate log message %% %%v %v %v", 123, 222);
```
> `%file`, `%func` `%line` and `%loc` format specifiers will not work with `printf` like logging.
[![top] Goto Top](#table-of-contents)
### Network Logging
You can send your messages to network. But you will have to implement your own way using log dispatcher API. We have written fully working sample for this purpose. Please see [Send to Network sample](/samples/send-to-network)
[![top] Goto Top](#table-of-contents)
### Verbose Logging
#### Basic
Verbose logging is useful in every software to record more information than usual. Very useful for troubleshooting. Following are verbose logging specific macros;
* `VLOG(verbose-level)`
* `CVLOG(verbose-level, logger ID)`
[![top] Goto Top](#table-of-contents)
#### Conditional and Occasional Logging
Verbose logging also has conditional and occasional logging aspects i.e,
* `VLOG_IF(condition, verbose-level)`
* `CVLOG_IF(condition, verbose-level, loggerID)`
* `VLOG_EVERY_N(n, verbose-level)`
* `CVLOG_EVERY_N(n, verbose-level, loggerID)`
* `VLOG_AFTER_N(n, verbose-level)`
* `CVLOG_AFTER_N(n, verbose-level, loggerID)`
* `VLOG_N_TIMES(n, verbose-level)`
* `CVLOG_N_TIMES(n, verbose-level, loggerID)`
[![top] Goto Top](#table-of-contents)
#### Verbose-Level
Verbose level is level of verbosity that can have range of 1-9. Verbose level will not be active unless you either set application arguments for it. Please read through [Application Arguments](#application-arguments) section to understand more about verbose logging.
In order to change verbose level on the fly, please use `Loggers::setVerboseLevel(base::type::VerboseLevel)` aka `Loggers::setVerboseLevel(int)` function. (You can check current verbose level by `Loggers::verboseLevel()`
[![top] Goto Top](#table-of-contents)
#### Check If Verbose Logging Is On
You can use a macro `VLOG_IS_ON(verbose-level)` to check to see if certain logging is on for source file for specified verbose level. This returns boolean that you can embed into if condition.
```c++
if (VLOG_IS_ON(2)) {
// Verbosity level 2 is on for this file
}
```
[![top] Goto Top](#table-of-contents)
#### VModule
VModule is functionality for verbose logging (as mentioned in above table) where you can specify verbosity by modules/source file. Following are some examples with explanation; Any of vmodule below starts with `-vmodule=` and `LoggingFlag::DisableVModulesExtensions` flag not set. Vmodule can completely be disabled by adding flag `LoggingFlag::DisableVModules`
Example with `LoggingFlag::AllowVerboseIfModuleNotSpecified` flag;
`main=3,parser*=4`:
* A bad example but good enough for explanation;
* Verbosity for any following file will be allowed;
`main{.h, .c, .cpp, .cc, .cxx, -inl.h, .hxx, .hpp}`
`parser{.h, .c, .cpp, .cc, .cxx, -inl.h, .hxx, .hpp}`
* No other file will be logged for verbose level
Example with no `LoggingFlag::AllowVerboseIfModuleNotSpecified` flag;
`main=3,parser*=4`:
Same explanation but any other file that does not fall under specified modules will have verbose logging enabled.
In order to change vmodules on the fly (instead of via command line args) - use `Loggers::setVModules(const char*)` where `const char*` represents the modules e.g, `main=3,parser*=4` (as per above example)
[![top] Goto Top](#table-of-contents)
### Registering New Loggers
Loggers are unique in logger repository by ID. You can register new logger the same way as you would get logger. Using `getLogger(.., ..)` from `el::Loggers` helper class. This function takes two params, first being ID and second being boolean (optional) to whether or not to register new logger if does not already exist and returns pointer to existing (or newly created) el::Logger class. This second param is optional and defaults to true. If you set it to false and logger does not exist already, it will return nullptr.
By default, Easylogging++ registers three loggers (+ an internal logger);
* Default logger (ID: `default`)
* Performance logger (ID: `performance`)
* Syslog logger (if `ELPP_SYSLOG` macro is defined) (ID: `syslog`)
If you wish to register a new logger, say e.g, with ID `business`
```c++
el::Logger* businessLogger = el::Loggers::getLogger("business");
```
This will register a new logger if it does not already exist otherwise it will get an existing one. But if you have passed in `false` to the second param and logger does not already exist, `businessLogger` will be nullptr.
When you register a new logger, default configurations are used (see Default Configurations section above). Also worth noticing, logger IDs are case sensitive.
[![top] Goto Top](#table-of-contents)
### Unregister Loggers
You may unregister loggers; any logger except for `default`. You should be really careful with this function, only unregister loggers that you have created yourself otherwise you may end up in unexpected errors. For example, you dont want to unregister logger that is used or initialized by a third-party library and it may be using it.
To unregister logger, use `el::Loggers::unregisterLogger("logger-id")`
[![top] Goto Top](#table-of-contents)
### Populating Existing Logger IDs
Although this is a rare situation but if you wish to get list of all the logger IDs currently in repository, you may use `el::Loggers::populateAllLoggerIds(std::vector&)` function to do that. The list passed in is cleared and filled up with all existing logger IDs.
[![top] Goto Top](#table-of-contents)
### Sharing Logging Repository
For advance logging, you can share your logging repositories to shared or static libraries, or even from library to application. This is rare case but a very good example is as follows;
Let's say we have an application that uses easylogging++ and has its own configuration, now you are importing library that uses easylogging++ and wants to access logging repository of main application. You can do this using two ways;
* Instead of using `INITIALIZE_EASYLOGGINGPP` you use `SHARE_EASYLOGGINGPP(access-function-to-repository)`
* Instead of using `INITIALIZE_EASYLOGGINGPP` you use `INITIALIZE_NULL_EASYLOGGINGPP` and then `el::Helpers::setStorage(el::base::type::StoragePointer)`
After you share repository, you can reconfigure the only repository (i.e, the one that is used by application and library both), and use both to write logs.
[![top] Goto Top](#table-of-contents)
# Extra Features
Easylogging++ is feature-rich logging library. Apart from features already mentioned above, here are some extra features. If code snippets don't make sense and further sample is needed, there are many samples available at github repository (samples). Feel free to browse around.
Some features require you to define macros (marked as prerequisite in each section) to enable them. This is to reduce compile time. If you want to enable all features you can define `ELPP_FEATURE_ALL`.
### Performance Tracking
Prerequisite: Define macro `ELPP_FEATURE_PERFORMANCE_TRACKING`
One of the most notable features of Easylogging++ is its ability to track performance of your function or block of function.
Please note, this is not backward compatible as previously we had macros that user must had defined in order to track performance and I am sure many users had avoided in doing so. (Read v8.91 ReadMe for older way of doing it)
The new way of tracking performance is much easier and reliable. All you need to do is use one of two macros from where you want to start tracking.
* `TIMED_FUNC(obj-name)`
* `TIMED_SCOPE(obj-name, block-name)`
* `TIMED_BLOCK(obj-name, block-name)`
An example that just uses usleep
```c++
void performHeavyTask(int iter) {
TIMED_FUNC(timerObj);
// Some initializations
// Some more heavy tasks
usleep(5000);
while (iter-- > 0) {
TIMED_SCOPE(timerBlkObj, "heavy-iter");
// Perform some heavy task in each iter
usleep(10000);
}
}
```
The result of above execution for iter = 10, is as following
```
06:22:31,368 INFO Executed [heavy-iter] in [10 ms]
06:22:31,379 INFO Executed [heavy-iter] in [10 ms]
06:22:31,389 INFO Executed [heavy-iter] in [10 ms]
06:22:31,399 INFO Executed [heavy-iter] in [10 ms]
06:22:31,409 INFO Executed [heavy-iter] in [10 ms]
06:22:31,419 INFO Executed [heavy-iter] in [10 ms]
06:22:31,429 INFO Executed [heavy-iter] in [10 ms]
06:22:31,440 INFO Executed [heavy-iter] in [10 ms]
06:22:31,450 INFO Executed [heavy-iter] in [10 ms]
06:22:31,460 INFO Executed [heavy-iter] in [10 ms]
06:22:31,460 INFO Executed [void performHeavyTask(int)] in [106 ms]
```
In the above example, we have used both the macros. In line-2 we have `TIMED_FUNC` with object pointer name timerObj and line-7 we have TIMED_SCOPE with object pointer name `timerBlkObj` and block name `heavy-iter`. Notice how block name is thrown out to the logs with every hit. (Note: `TIMED_FUNC` is `TIMED_SCOPE` with block name = function name)
You might wonder why do we need object name. Well easylogging++ performance tracking feature takes it further and provides ability to add, what's called checkpoints.
Checkpoints have two macros:
* `PERFORMANCE_CHECKPOINT(timed-block-obj-name)`
* `PERFORMANCE_CHECKPOINT_WITH_ID(timed-block-obj-name, id)`
Take a look at following example
```c++
void performHeavyTask(int iter) {
TIMED_FUNC(timerObj);
// Some initializations
// Some more heavy tasks
usleep(5000);
while (iter-- > 0) {
TIMED_SCOPE(timerBlkObj, "heavy-iter");
// Perform some heavy task in each iter
// Notice following sleep varies with each iter
usleep(iter * 1000);
if (iter % 3) {
PERFORMANCE_CHECKPOINT(timerBlkObj);
}
}
}
```
Notice macro on line-11 (also note comment on line-8). It's checkpoint for heavy-iter block. Now notice following output
```
06:33:07,558 INFO Executed [heavy-iter] in [9 ms]
06:33:07,566 INFO Performance checkpoint for block [heavy-iter] : [8 ms]
06:33:07,566 INFO Executed [heavy-iter] in [8 ms]
06:33:07,573 INFO Performance checkpoint for block [heavy-iter] : [7 ms]
06:33:07,573 INFO Executed [heavy-iter] in [7 ms]
06:33:07,579 INFO Executed [heavy-iter] in [6 ms]
06:33:07,584 INFO Performance checkpoint for block [heavy-iter] : [5 ms]
06:33:07,584 INFO Executed [heavy-iter] in [5 ms]
06:33:07,589 INFO Performance checkpoint for block [heavy-iter] : [4 ms]
06:33:07,589 INFO Executed [heavy-iter] in [4 ms]
06:33:07,592 INFO Executed [heavy-iter] in [3 ms]
06:33:07,594 INFO Performance checkpoint for block [heavy-iter] : [2 ms]
06:33:07,594 INFO Executed [heavy-iter] in [2 ms]
06:33:07,595 INFO Performance checkpoint for block [heavy-iter] : [1 ms]
06:33:07,595 INFO Executed [heavy-iter] in [1 ms]
06:33:07,595 INFO Executed [heavy-iter] in [0 ms]
06:33:07,595 INFO Executed [void performHeavyTask(int)] in [51 ms]
```
You can also compare two checkpoints if they are in sub-blocks e.g, changing from `PERFORMANCE_CHECKPOINT(timerBlkObj)` to `PERFORMANCE_CHECKPOINT(timerObj)` will result in following output
```
06:40:35,522 INFO Performance checkpoint for block [void performHeavyTask(int)] : [51 ms ([1 ms] from last checkpoint)]
```
If you had used `PERFORMANCE_CHECKPOINT_WITH_ID(timerObj, "mychkpnt");` instead, you will get
```
06:44:37,979 INFO Performance checkpoint [mychkpnt] for block [void performHeavyTask(int)] : [51 ms ([1 ms] from checkpoint 'mychkpnt')]
```
Following are some useful macros that you can define to change the behaviour
| Macro Name | Description |
|-----------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|
| `ELPP_DISABLE_PERFORMANCE_TRACKING` | Disables performance tracking |
| `ELPP_PERFORMANCE_MICROSECONDS` | Track up-to microseconds (this includes initializing of el::base::PerformanceTracker as well so might time not be 100% accurate) |
Notes:
1. Performance tracking uses `performance` logger (INFO level) by default unless `el::base::PerformanceTracker` is constructed manually (not using macro - not recommended). When configuring other loggers, make sure you configure this one as well.
2. In above examples, `timerObj` and `timerBlkObj` is of type `el::base::type::PerformanceTrackerPtr`. The `checkpoint()` routine of the `el::base::PerformanceTracker` can be accessed by `timerObj->checkpoint()` but not recommended as this will override behaviour of using macros, behaviour like location of checkpoint.
3. In order to access `el::base::type::PerformanceTrackerPtr` while in `TIMED_BLOCK`, you can use `timerObj.timer`
4. `TIMED_BLOCK` macro resolves to a single-looped for-loop, so be careful where you define `TIMED_BLOCK`, if for-loop is allowed in the line where you use it, you should have no errors.
> You may be interested in [python script to parse performance logs](https://github.com/muflihun/easyloggingpp/issues/206)
[![top] Goto Top](#table-of-contents)
#### Conditional Performance Tracking
If you want to enable performance tracking for certain conditions only, e.g. based on a certain verbosity level, you can use the variants `TIMED_FUNC_IF` or `TIMED_SCOPE_IF`.
A verbosity level example is given below
```c++
void performHeavyTask(int iter) {
// enable performance tracking for verbosity level 4 or higher
TIMED_FUNC_IF( timerObj, VLOG_IS_ON(4) );
// Some more heavy tasks
}
```
[![top] Goto Top](#table-of-contents)
#### Make Use of Performance Tracking Data
If you wish to capture performance tracking data right after it is finished, you can do so by extending `el::PerformanceTrackingCallback`.
In order to install this handler, use `void Helpers::installPerformanceTrackingCallback(const std::string& id)`. Where `T` is type of your handler. If you wish to uninstall a callback, you can do so by using `Helpers::uninstallPerformanceTrackingCallback(const std::string& id)`. See samples for details
> DO NOT TRACK PERFORMANCE IN THIS HANDLER OR YOU WILL END UP IN INFINITE-LOOP
[![top] Goto Top](#table-of-contents)
### Log File Rotating
Easylogging++ has ability to roll out (or throw away / rotate) log files if they reach certain limit. You can configure this by setting `Max_Log_File_Size`. See Configuration section above.
Rollout checking happens when Easylogging++ flushes the log file, or, if you have added the flag `el::LoggingFlags::StrictLogFileSizeCheck`, at each log output.
This feature has its own section in this reference manual because you can do stuffs with the file being thrown away. This is useful, for example if you wish to back this file up etc.
This can be done by using `el::Helpers::installPreRollOutCallback(const PreRollOutCallback& handler)` where `PreRollOutCallback` is typedef of type `std::function`. Please note following if you are using this feature
There is a [sample](/samples/STL/logrotate.cpp) available that you can use as basis.
> You should not log anything in this function. This is because logger would already be locked in multi-threaded application and you can run into dead lock conditions. If you are sure that you are not going to log to same file and not using same logger, feel free to give it a try.
[![top] Goto Top](#table-of-contents)
### Crash Handling
Prerequisite: Define macro `ELPP_FEATURE_CRASH_LOG`
Easylogging++ provides ability to handle unexpected crashes for GCC compilers. This is active by default and can be disabled by defining macro `ELPP_DISABLE_DEFAULT_CRASH_HANDLING`. By doing so you are telling library not to handle any crashes. Later on if you wish to handle crash yourself, you can assign crash handler of type void func(int) where int is signal caught.
Following signals are handled;
* SIGABRT (If `ELPP_HANDLE_SIGABRT` macro is defined)
* SIGFPE
* SIGILL
* SIGSEGV
* SIGINT
Stacktraces are not printed by default, in order to do so define macro `ELPP_FEATURE_CRASH_LOG`. Remember, stack trace is only available for GCC compiler.
> Default handler and stack trace uses `default` logger.
Following are some useful macros that you can define to change the behaviour
| Macro Name | Description |
|-----------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|
| `ELPP_DISABLE_DEFAULT_CRASH_HANDLING` | Disables default crash handling. |
| `ELPP_HANDLE_SIGABRT` | Enables handling `SIGABRT`. This is disabled by default to prevent annoying `CTRL + C` behaviour when you wish to abort. |
[![top] Goto Top](#table-of-contents)
#### Installing Custom Crash Handlers
You can use your own crash handler by using `el::Helpers::setCrashHandler(const el::base::debug::CrashHandler::Handler&);`.
> Make sure to abort application at the end of your crash handler using `el::Helpers::crashAbort(int)`. If you fail to do so, you will get into endless loop of crashes.
Here is a good example of your own handler
```c++
#include "easylogging++.h"
INITIALIZE_EASYLOGGINGPP
void myCrashHandler(int sig) {
LOG(ERROR) << "Woops! Crashed!";
// FOLLOWING LINE IS ABSOLUTELY NEEDED AT THE END IN ORDER TO ABORT APPLICATION
el::Helpers::crashAbort(sig);
}
int main(void) {
el::Helpers::setCrashHandler(myCrashHandler);
LOG(INFO) << "My crash handler!";
int* i;
*i = 0; // Crash!
return 0;
}
```
> If you wish to log reason for crash you can do so by using `el::Helpers::logCrashReason(int, bool, const el::Level&, const char*)`. Following are default parameters for this function:
```c++
> bool stackTraceIfAvailable = false
> const el::Level& level = el::Level::Fatal
> const char* logger = "default"
```
[![top] Goto Top](#table-of-contents)
### Stacktrace
Prerequisite: Define macro `ELPP_FEATURE_CRASH_LOG`
Easylogging++ supports stack trace printing for GCC compilers. You can print stack trace at anytime by calling `el::base::debug::StackTrace()`, formatting will be done automatically. Note, if you are using non-GCC compiler, you will end-up getting empty output.
[![top] Goto Top](#table-of-contents)
### Multi-threading
Prerequisite: Define macro `ELPP_THREAD_SAFE`
Easylogging++ is thread-safe. By default thread-safety is disabled. You can enable it by defining `ELPP_THREAD_SAFE` otherwise you will see unexpected results. This is intentional to make library efficient for single threaded application.
[![top] Goto Top](#table-of-contents)
### CHECK Macros
Easylogging++ supports CHECK macros, with these macros you can quickly check whether certain condition fulfills or not. If not Easylogging++ writes FATAL log, causing application to stop (unless defined macro to prevent stopping application on fatal).
| CHECK Name | Notes + Example |
|---------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|
| `CHECK(condition)` | Checks for condition e.g, `CHECK(isLoggedIn()) << "Not logged in";` |
| `CHECK_EQ(a, b)` | Equality check e.g, `CHECK_EQ(getId(), getLoggedOnId()) << "Invalid user logged in";` |
| `CHECK_NE(a, b)` | Inequality check e.g, `CHECK_NE(isUserBlocked(userId), false) << "User is blocked";` |
| `CHECK_LT(a, b)` | Less than e.g, `CHECK_LT(1, 2) << "How 1 is not less than 2";` |
| `CHECK_GT(a, b)` | Greater than e.g, `CHECK_GT(2, 1) << "How 2 is not greater than 1?";` |
| `CHECK_LE(a, b)` | Less than or equal e.g, `CHECK_LE(1, 1) << "1 is not equal or less than 1";` |
| `CHECK_GE(a, b)` | Greater than or equal e.g, `CHECK_GE(1, 1) << "1 is not equal or greater than 1";` |
| `CHECK_NOTNULL(pointer)` | Ensures pointer is not null. This function does not return anything |
| `CHECK_STREQ(str1, str2)` | C-string equality (case-sensitive) e.g, `CHECK_STREQ(argv[1], "0") << "First arg cannot be 0";` |
| `CHECK_STRNE(str1, str2)` | C-string inequality (case-sensitive) e.g, `CHECK_STRNE(username1, username2) << "Usernames cannot be same";` |
| `CHECK_STRCASEEQ(str1, str2)` | C-string inequality (*case-insensitive*) e.g, `CHECK_CASESTREQ(argv[1], "Z") << "First arg cannot be 'z' or 'Z'";` |
| `CHECK_STRCASENE(str1, str2)` | C-string inequality (*case-insensitive*) e.g, `CHECK_STRCASENE(username1, username2) << "Same username not allowed";` |
| `CHECK_BOUNDS(val, min, max)` | Checks that `val` falls under the `min` and `max` range e.g, `CHECK_BOUNDS(i, 0, list.size() - 1) << "Index out of bounds";` |
> Same versions of macros are available for `DEBUG` only mode, these macros start with `D` (for debug) followed by the same name. e.g, `DCHECK` to check only in debug mode (i.e, when `_DEBUG` is defined or `NDEBUG` is undefined)
[![top] Goto Top](#table-of-contents)
### Logging perror()
Easylogging++ supports `perror()` styled logging using `PLOG(LEVEL)`, `PLOG_IF(Condition, LEVEL)`, and `PCHECK()` using `default` logger; and for custom logger use `CPLOG(LEVEL, LoggerId)`, `CPLOG_IF(Condition, LEVEL, LoggerId)`. This will append `: log-error [errno]` in the end of log line.
[![top] Goto Top](#table-of-contents)
### Syslog
Prerequisite: Define macro `ELPP_SYSLOG`
Easylogging++ supports syslog for platforms that have `syslog.h` header. If your platform does not have `syslog.h`, make sure you do not define this macro or you will end up in errors. Once you are ready to use syslog, you can do so by using one of `SYSLOG(LEVEL)`, `SYSLOG_IF(Condition, LEVEL)`, `SYSLOG_EVERY_N(n, LEVEL)` and uses logger ID: `syslog`. If you want to use custom logger you can do so by using `CSYSLOG(LEVEL, loggerId)` or `CSYSLOG_IF(Condition, LEVEL, loggerId)` or `CSYSLOG_EVERY_N(n, LEVEL, loggerId)`
Syslog in Easylogging++ supports C++ styled streams logging, following example;
```c++
#include "easylogging++.h"
INITIALIZE_EASYLOGGINGPP
int main(void) {
ELPP_INITIALIZE_SYSLOG("my_proc", LOG_PID | LOG_CONS | LOG_PERROR, LOG_USER) // This is optional, you may not add it if you dont want to specify options
// Alternatively you may do
// el::SysLogInitializer elSyslogInit("my_proc", LOG_PID | LOG_CONS | LOG_PERROR, LOG_USER);
SYSLOG(INFO) << "This is syslog - read it from /var/log/syslog"
return 0;
}
```
Syslog support for Easylogging++ only supports following levels; each level is corresponded with syslog priority as following
* INFO (LOG_INFO)
* DEBUG (LOG_DEBUG)
* WARNING (LOG_WARNING)
* ERROR (LOG_ERR)
* FATAL (LOG_EMERG)
Following levels are not supported and correspond to `LOG_NOTICE`: TRACE, whereas VERBOSE level is completely not supported
[![top] Goto Top](#table-of-contents)
### STL Logging
Prerequisite: Define macro `ELPP_STL_LOGGING`
As mentioned earlier, with easylogging++, you can log your STL templates including most containers. In order to do so you will need to define `ELPP_STL_LOGGING` macro. This enables including all the necessary headers and defines all necessary functions.
For performance, containers are limited to log maximum of 100 entries. This behaviour can be changed by changed header file (base::consts::kMaxLogPerContainer) but not recommended as in order to log, writer has to go through each entry causing potential delays. But if you are not really concerned with performance, you may change this value.
[![top] Goto Top](#table-of-contents)
#### Supported Templates
Following templates are supported as part of STL Logging; note: basic and primitive types e.g, std::string or long are not listed as they is supported anyway, following list only contains non-basic types e.g, containers or bitset etc.
| * | * | * | * |
|-------------|-------------------------|------------------|------------------|
| std::vector | std::list | std::deque | std::queue |
| std::stack | std::priority_queue | std::set | std::multiset |
| std::pair | std::bitset | std::map | std::multimap |
Some C++11 specific templates are supported by further explicit macro definitions; note these also need `ELPP_STL_LOGGING`
| Template | Macro Needed |
|-------------------------|-----------------------------|
| std::array | `ELPP_LOG_STD_ARRAY` |
| std::unordered_map | `ELPP_LOG_UNORDERED_MAP` |
| std::unordered_multimap | `ELPP_LOG_UNORDERED_MAP` |
| std::unordered_set | `ELPP_LOG_UNORDERED_SET` |
| std::unordered_multiset | `ELPP_LOG_UNORDERED_SET` |
Standard manipulators are also supported, in addition std::stringstream is also supported.
[![top] Goto Top](#table-of-contents)
### Qt Logging
Prerequisite: Define macro `ELPP_QT_LOGGING`
Easylogging++ has complete logging support for Qt core library. When enabled, this will include all the headers supported Qt logging. Once you did that, you should be good to go.
Following Qt classes and containers are supported by Easylogging++ v9.0+
| * | * | * | * | * | * |
|---------------|---------------------------|--------------------|--------------------|--------------------|--------------------|
| `QString` | `QByteArray` | `QLatin` | `QList` | `QVector` | `QQueue` |
| `QSet` | `QPair` | `QMap` | `QMultiMap` | `QHash` | `QMultiHash` |
| `QLinkedList` | `QStack` | `QChar` | `q[u]int[64]` | | |
Similar to STL logging, Qt containers are also limit to log 100 entries per log, you can change this behaviour by changing base::consts::kMaxLogPerContainer from header but this is not recommended as this was done for performance purposes.
Also note, if you are logging a container that contains custom class, make sure you have read Extending Library section below.
[![top] Goto Top](#table-of-contents)
### Boost Logging
Prerequisite: Define macro `ELPP_BOOST_LOGGING`
Easylogging++ supports some of boost templates. Following table shows the templates supported.
| * | * |
|-------------------------------------|------------------------------------------|
| `boost::container::vector` | `boost::container::stable_vector` |
| `boost::container::map` | `boost::container::flat_map` |
| `boost::container::set` | `boost::container::flat_set` |
| `boost::container::deque` | `boost::container::list` |
| `boost::container::string` | |
[![top] Goto Top](#table-of-contents)
### wxWidgets Logging
Prerequisite: Define macro `ELPP_WXWIDGETS_LOGGING`
Easylogging++ supports some of wxWidgets templates.
Following table shows the templates supported.
| * | * | * | * | * | * |
|---------------------|-------------------|---------------------------|---------------------------|---------------------|----------------------|
| `wxString` | `wxVector` | `wxList` | `wxString` | `wxHashSet` | `wxHashMap` |
wxWidgets has its own way of declaring and defining some templates e.g, `wxList` where you use `WX_DECLARE_LIST` macro to declare a list.
In order to setup a container for logging that holds pointers to object, use `ELPP_WX_PTR_ENABLED`, otherwise if container holds actual object e.g, wxHashSet use `ELPP_WX_ENABLED`. For containers like `wxHashMap` because it contains value and pair, use `ELPP_WX_HASH_MAP_ENABLED` macro.
```c++
// wxList example
WX_DECLARE_LIST(int, MyList);
WX_DEFINE_LIST(MyList);
// Following line does the trick
ELPP_WX_PTR_ENABLED(MyList);
// wxHashSet example
WX_DECLARE_HASH_SET(int, wxIntegerHash, wxIntegerEqual, IntHashSet);
// Following line does the trick!
ELPP_WX_ENABLED(IntHashSet)
// wxHashMap example
WX_DECLARE_STRING_HASH_MAP(wxString, MyHashMap);
// Following line does the trick
ELPP_WX_HASH_MAP_ENABLED(MyHashMap)
```
You may also have a look at wxWidgets sample
[![top] Goto Top](#table-of-contents)
### Extending Library
You can extend this library using various callback handlers and inheritable classes.
A perfect example of using these features is the logging server built with this library. It's called [Residue](https://github.com/muflihun/residue/) that is feature rich. In fact, you may be interested in using that instead of this library for your medium to large sized projects.
#### Logging Your Own Class
You can log your own classes by extending `el::Loggable` class and implementing pure-virtual function `void log(std::ostream& os) const`. Following example shows a good way to extend a class.
```c++
#include "easylogging++.h"
INITIALIZE_EASYLOGGINGPP
class Integer : public el::Loggable {
public:
Integer(int i) : m_underlyingInt(i) {
}
Integer& operator=(const Integer& integer) {
m_underlyingInt = integer.m_underlyingInt;
return *this;
}
// Following line does the trick!
// Note: el::base::type::ostream_t is either std::wostream or std::ostream depending on unicode enabled or not
virtual void log(el::base::type::ostream_t& os) const {
os << m_underlyingInt;
}
private:
int m_underlyingInt;
};
int main(void) {
Integer count = 5;
LOG(INFO) << count;
return 0;
}
```
[![top] Goto Top](#table-of-contents)
#### Logging Third-party Class
Let's say you have third-party class that you don't have access to make changes to, and it's not yet loggable. In order to make it loggable, you can use `MAKE_LOGGABLE(ClassType, ClassInstance, OutputStreamInstance)` to make it Easylogging++ friendly.
Following sample shows a good usage:
```c++
#include "easylogging++.h"
INITIALIZE_EASYLOGGINGPP
class Integer {
public:
Integer(int i) : m_underlyingInt(i) {
}
Integer& operator=(const Integer& integer) {
m_underlyingInt = integer.m_underlyingInt;
return *this;
}
int getInt(void) const { return m_underlyingInt; }
private:
int m_underlyingInt;
};
// Following line does the trick!
inline MAKE_LOGGABLE(Integer, integer, os) {
os << integer.getInt();
return os;
}
int main(void) {
Integer count = 5;
LOG(INFO) << count;
return 0;
}
```
Another very nice example (to log `std::chrono::system_clock::time_point`)
```c++
inline MAKE_LOGGABLE(std::chrono::system_clock::time_point, when, os) {
time_t t = std::chrono::system_clock::to_time_t(when);
auto tm = std::localtime(&t);
char buf[1024];
strftime(buf,sizeof(buf), "%F %T (%Z)", tm);
os << buf;
return os;
}
```
This may not be practically best implementation but you get the point.
> Just be careful with this as having a time-consuming overloading of `log(el::base::type::ostream_t& os)` and `MAKE_LOGGABLE`, they get called everytime class is being logged.
[![top] Goto Top](#table-of-contents)
### Manually Flushing and Rolling Log Files
You can manually flush log files using `el::Logger::flush()` (to flush single logger with all referencing log files) or `el::Loggers::flushAll()` (to flush all log files for all levels).
If you have not set flag `LoggingFlag::StrictLogFileSizeCheck` for some reason, you can manually check for log files that need rolling; by using `el::Helpers::validateFileRolling(el::Logger*, const el::Level&)`.
[![top] Goto Top](#table-of-contents)
### Log Dispatch Callback
If you wish to capture log message right after it is dispatched, you can do so by having a class that extends `el::LogDispatchCallback` and implement the pure-virtual functions, then install it at anytime using `el::Helpers::installLogDispatchCallback(const std::string&)`. If you wish to uninstall a pre-installed handler with same ID, you can do so by using `el::Helpers::uninstallLogDispatchCallback(const std::string&)`
You can use this feature to send it to custom destinations e.g, log stash or TCP client etc.
You can also look at [send-to-network](/samples/send-to-network) sample for practical usage of this.
```c++
// samples/send-to-network/network-logger.cpp
#include "easylogging++.h"
#include
INITIALIZE_EASYLOGGINGPP
class Client
{
boost::asio::io_service* io_service;
boost::asio::ip::tcp::socket socket;
public:
Client(boost::asio::io_service* svc, const std::string& host, const std::string& port)
: io_service(svc), socket(*io_service)
{
boost::asio::ip::tcp::resolver resolver(*io_service);
boost::asio::ip::tcp::resolver::iterator endpoint = resolver.resolve(boost::asio::ip::tcp::resolver::query(host, port));
boost::asio::connect(this->socket, endpoint);
};
void send(std::string const& message) {
socket.send(boost::asio::buffer(message));
}
};
class NetworkDispatcher : public el::LogDispatchCallback
{
public:
void updateServer(const std::string& host, int port) {
m_client = std::unique_ptr(new Client(&m_svc, host, std::to_string(port)));
}
protected:
void handle(const el::LogDispatchData* data) noexcept override {
m_data = data;
// Dispatch using default log builder of logger
dispatch(m_data->logMessage()->logger()->logBuilder()->build(m_data->logMessage(),
m_data->dispatchAction() == el::base::DispatchAction::NormalLog));
}
private:
const el::LogDispatchData* m_data;
boost::asio::io_service m_svc;
std::unique_ptr m_client;
void dispatch(el::base::type::string_t&& logLine) noexcept
{
m_client->send(logLine);
}
};
int main() {
el::Helpers::installLogDispatchCallback("NetworkDispatcher");
// you can uninstall default one by
// el::Helpers::uninstallLogDispatchCallback("DefaultLogDispatchCallback");
// Set server params
NetworkDispatcher* dispatcher = el::Helpers::logDispatchCallback("NetworkDispatcher");
dispatcher->setEnabled(true);
dispatcher->updateServer("127.0.0.1", 9090);
// Start logging and normal program...
LOG(INFO) << "First network log";
// You can even use a different logger, say "network" and send using a different log pattern
}
```
> DO NOT LOG ANYTHING IN THIS HANDLER OR YOU WILL END UP IN INFINITE-LOOP
[![top] Goto Top](#table-of-contents)
### Logger Registration Callback
If you wish to capture event of logger registration (and potentially want to reconfigure this logger without changing default configuration) you can use `el::LoggerRegistrationCallback`. The syntax is similar to [other callbacks](#log-dispatch-callback). You can use [this sample](https://github.com/muflihun/easyloggingpp/blob/master/samples/STL/new-logger-registration-callback.cpp) as basis.
> DO NOT LOG ANYTHING IN THIS HANDLER
[![top] Goto Top](#table-of-contents)
### Asynchronous Logging
Prerequisite: Define macro `ELPP_EXPERIMENTAL_ASYNC`
Asynchronous logging is in experimental stages and they are not widely promoted. You may enable and test this feature by defining macro `ELPP_EXPERIMENTAL_ASYNC` and if you find some issue with the feature please report in [this issue](https://github.com/muflihun/easyloggingpp/issues/202). Reporting issues always help for constant improvements.
Please note:
* Asynchronous will only work with few compilers (it purely uses `std::thread`)
* Compiler should support `std::this_thread::sleep_for`. This restriction may (or may not) be removed in future (stable) version of asynchronous logging.
* You should not rely on asynchronous logging in production, this is because feature is in experiemental stages.
[![top] Goto Top](#table-of-contents)
### Helper Classes
There are static helper classes available to make it easy to do stuffs;
* `el::Helpers`
* `el::Loggers`
You can do various cool stuffs using functions in these classes, see [this issue](https://github.com/muflihun/easyloggingpp/issues/210) for instance.
[![top] Goto Top](#table-of-contents)
# Contribution
### Submitting Patches
You can submit patches to `develop` branch and we will try and merge them. Since it's based on single header, it can be sometimes difficult to merge without having merge conflicts.
[![top] Goto Top](#table-of-contents)
### Reporting a Bug
If you have found a bug and wish to report it, feel free to do so at [github issue tracker](https://github.com/muflihun/easyloggingpp/issues?state=open). I will try to look at it as soon as possible. Some information should be provided to make it easy to reproduce;
* Platform (OS, Compiler)
* Log file location
* Macros defined (on compilation) OR simple compilation
* Please assign issue label.
Try to provide as much information as possible. Any bug with no clear information will be ignored and closed.
[![top] Goto Top](#table-of-contents)
# Compatibility
Easylogging++ requires a decent C++0x complient compiler. Some compilers known to work with v9.0+ are shown in table below, for older versions please refer to readme on corresponding release at github
| ***** | Compiler/Platform | Notes |
|---------|---------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
|![gcc] | GCC 4.6.4+ | Stack trace logging. Very close to support GCC 4.6.0 if it had supported strong enum types casting to underlying type. It causes internal compiler error. |
|![llvm] | Clang++ 3.1+ | Stack trace logging only with gcc compliant. |
|![intel] | Intel C++ 13.0+ | Workarounds to support: Use if instead of switch on strong enum type. No `final` keyword etc. Stack trace logging only with gcc compliant |
|![vcpp] | Visual C++ 11.0+ | Tested with VS2012, VS2013; Use of argument templates instead of variadic templates. CRT warnings control. No stack trace logging. |
|![mingw] | MinGW | (gcc version 4.7+) Workarounds to support: Mutex wrapper, no stack trace logging. No thread ID on windows |
|![tdm] | TDM-GCC 4.7.1 | Tested with TDM-GCC 4.7.1 32 and 64 bit compilers |
|![cygwin]| Cygwin | Tested with gcc version 4.8+ |
|![devcpp]| Dev C++ 5.4+ | Tested with Dev-C++ 5.4.2 using TDM-GCC 4.7.1 32 & 64-bit compilers |
Operating systems that have been tested are shown in table below. Easylogging++ should work on other major operating systems that are not in the list.
| ***** | Operating System | Notes |
|---------------|------------------------|-------------------------------------------------------------------------------------|
|![win10] | Windows 10 | Tested on 64-bit, should also work on 32-bit |
|![win8] | Windows 8 | Tested on 64-bit, should also work on 32-bit |
|![win7] | Windows 7 | Tested on 64-bit, should also work on 32-bit |
|![winxp] | Windows XP | Tested on 32-bit, should also work on 64-bit |
|![mac] | Mac OSX | Clang++ 3.1, g++ (You need `-std=c++11 -stdlib=libc++` to successfully compile) |
|![sl] | Scientific Linux 6.2 | Tested using Intel C++ 13.1.3 (gcc version 4.4.6 compatibility) |
|![mint] | Linux Mint 14 | 64-bit, mainly developed on this machine using all compatible linux compilers |
|![fedora] | Fedora 19 | 64-bit, using g++ 4.8.1 |
|![ubuntu] | Ubuntu 13.04 | 64-bit, using g++ 4.7.3 (libstdc++6-4.7-dev) |
|![freebsd] | FreeBSD | (from github user) |
|![android] | Android | Tested with C4droid (g++) on Galaxy Tab 2 |
|![raspberrypi] | RaspberryPi 7.6 | Tested with 7.6.2-1.1 (gcc version 4.9.1 (Raspbian 4.9.1-1)) by contributor |
|![solaris] | Solaris i86 | Tested by contributor |
|![aix] | IBM AIX | Support added by contributor |
Easylogging++ has also been tested with following C++ libraries;
| ***** | Library | Notes |
|-------------|------------------------|-------------------------------------------------------------------------------------|
|![qt] | Qt | Tested with Qt 4.6.2, Qt 5 and Qt 5.5 (with C++0x and C++11) |
|![boost] | Boost | Tested with boost 1.51 |
|![wxwidgets] | wxWidgets | Tested with wxWidgets 2.9.4 |
|![gtkmm] | gtkmm | Tested with gtkmm 2.4 |
[![top] Goto Top](#table-of-contents)
## Build Matrix
| Branch | Platform | Build Status |
| -------- |:------------:|:------------:|
| `develop` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `clang++` | [](https://travis-ci.org/muflihun/easyloggingpp) |
| `develop` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-4.9` | [](https://travis-ci.org/muflihun/easyloggingpp) |
| `develop` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-5` | [](https://travis-ci.org/muflihun/easyloggingpp) |
| `develop` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-6` | [](https://travis-ci.org/muflihun/easyloggingpp) |
| `develop` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-7` | [](https://travis-ci.org/muflihun/easyloggingpp) |
| `master` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `clang++` | [](https://travis-ci.org/muflihun/easyloggingpp) |
| `master` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-4.9` | [](https://travis-ci.org/muflihun/easyloggingpp) |
| `master` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-5` | [](https://travis-ci.org/muflihun/easyloggingpp) |
| `master` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-6` | [](https://travis-ci.org/muflihun/easyloggingpp) |
| `master` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-7` | [](https://travis-ci.org/muflihun/easyloggingpp) |
[![top] Goto Top](#table-of-contents)
# Licence
```
The MIT License (MIT)
Copyright (c) 2012-2018 Zuhd Web Services
Copyright (c) 2012-2018 @abumusamq
https://github.com/zuhd-org/
https://zuhd.org
https://muflihun.com
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```
[![top] Goto Top](#table-of-contents)
# Disclaimer
Icons used in this manual (in compatibility section) are solely for information readability purposes. I do not own these icons. If anyone has issues with usage of these icon, please feel free to contact me via company's email and I will look for an alternative. Company's email address is required so that I can verify the ownership, any other email address for this purpose will be ignored.
"Pencil +" icon is Easylogging++ logo and should only be used where giving credit to Easylogging++ library.
[![top] Goto Top](#table-of-contents)
[banner]: https://muflihun.github.io/easyloggingpp/images/banner.png?v=4
[ubuntu]: https://muflihun.github.io/easyloggingpp/images/icons/ubuntu.png?v=2
[mint]: https://muflihun.github.io/easyloggingpp/images/icons/linux-mint.png?v=2
[freebsd]: https://muflihun.github.io/easyloggingpp/images/icons/free-bsd.png?v=2
[sl]: https://muflihun.github.io/easyloggingpp/images/icons/scientific-linux.png?v=2
[fedora]: https://muflihun.github.io/easyloggingpp/images/icons/fedora.png?v=3
[mac]: https://muflihun.github.io/easyloggingpp/images/icons/mac-osx.png?v=2
[winxp]: https://muflihun.github.io/easyloggingpp/images/icons/windowsxp.png?v=2
[win7]: https://muflihun.github.io/easyloggingpp/images/icons/windows7.png?v=2
[win8]: https://muflihun.github.io/easyloggingpp/images/icons/windows8.png?v=2
[win10]: https://muflihun.github.io/easyloggingpp/images/icons/windows10.png?v=2
[qt]: https://muflihun.github.io/easyloggingpp/images/icons/qt.png?v=3
[boost]: https://muflihun.github.io/easyloggingpp/images/icons/boost.png?v=3
[wxwidgets]: https://muflihun.github.io/easyloggingpp/images/icons/wxwidgets.png?v=3
[devcpp]: https://muflihun.github.io/easyloggingpp/images/icons/devcpp.png?v=3
[gtkmm]: https://muflihun.github.io/easyloggingpp/images/icons/gtkmm.png?v=3
[tdm]: https://muflihun.github.io/easyloggingpp/images/icons/tdm.png?v=3
[raspberrypi]: https://muflihun.github.io/easyloggingpp/images/icons/raspberry-pi.png?v=3
[solaris]: https://muflihun.github.io/easyloggingpp/images/icons/solaris.png?v=3
[aix]: https://muflihun.github.io/easyloggingpp/images/icons/aix.png?v=4
[gcc]: https://muflihun.github.io/easyloggingpp/images/icons/gcc.png?v=4
[mingw]: https://muflihun.github.io/easyloggingpp/images/icons/mingw.png?v=2
[cygwin]: https://muflihun.github.io/easyloggingpp/images/icons/cygwin.png?v=2
[vcpp]: https://muflihun.github.io/easyloggingpp/images/icons/vcpp.png?v=2
[llvm]: https://muflihun.github.io/easyloggingpp/images/icons/llvm.png?v=2
[intel]: https://muflihun.github.io/easyloggingpp/images/icons/intel.png?v=2
[android]: https://muflihun.github.io/easyloggingpp/images/icons/android.png?v=2
[manual]: https://muflihun.github.io/easyloggingpp/images/help.png?v=3
[download]: https://muflihun.github.io/easyloggingpp/images/download.png?v=2
[samples]: https://muflihun.github.io/easyloggingpp/images/sample.png?v=2
[notes]: https://muflihun.github.io/easyloggingpp/images/notes.png?v=4
[top]: https://muflihun.github.io/easyloggingpp/images/up.png?v=4
[www]: https://muflihun.github.io/easyloggingpp/images/logo-www.png?v=6
easyloggingpp-9.96.7/cmake/ 0000775 0000000 0000000 00000000000 13376062224 0015563 5 ustar 00root root 0000000 0000000 easyloggingpp-9.96.7/cmake/FindEASYLOGGINGPP.cmake 0000664 0000000 0000000 00000002277 13376062224 0021406 0 ustar 00root root 0000000 0000000 #
# CMake module for Easylogging++ logging library
#
# Defines ${EASYLOGGINGPP_INCLUDE_DIR}
#
# If ${EASYLOGGINGPP_USE_STATIC_LIBS} is ON then static libs are searched.
# In these cases ${EASYLOGGINGPP_LIBRARY} is also defined
#
# (c) 2017-2018 Zuhd Web Services
#
# https://github.com/zuhd-org/easyloggingpp
# https://zuhd.org
# https://muflihun.com
#
message ("-- Easylogging++: Searching...")
set(EASYLOGGINGPP_PATHS ${EASYLOGGINGPP_ROOT} $ENV{EASYLOGGINGPP_ROOT})
find_path(EASYLOGGINGPP_INCLUDE_DIR
easylogging++.h
PATH_SUFFIXES include
PATHS ${EASYLOGGINGPP_PATHS}
)
if (EASYLOGGINGPP_USE_STATIC_LIBS)
message ("-- Easylogging++: Static linking is preferred")
find_library(EASYLOGGINGPP_LIBRARY
NAMES libeasyloggingpp.a libeasyloggingpp.dylib libeasyloggingpp
HINTS "${CMAKE_PREFIX_PATH}/lib"
)
elseif (EASYLOGGINGPP_USE_SHARED_LIBS)
message ("-- Easylogging++: Dynamic linking is preferred")
find_library(EASYLOGGINGPP_LIBRARY
NAMES libeasyloggingpp.dylib libeasyloggingpp libeasyloggingpp.a
HINTS "${CMAKE_PREFIX_PATH}/lib"
)
endif()
find_package_handle_standard_args(EASYLOGGINGPP REQUIRED_VARS EASYLOGGINGPP_INCLUDE_DIR)
easyloggingpp-9.96.7/cmake/Findgtest.cmake 0000664 0000000 0000000 00000012765 13376062224 0020527 0 ustar 00root root 0000000 0000000 # Locate the Google C++ Testing Framework.
#
# Defines the following variables:
#
# GTEST_FOUND - Found the Google Testing framework
# GTEST_INCLUDE_DIRS - Include directories
#
# Also defines the library variables below as normal
# variables. These contain debug/optimized keywords when
# a debugging library is found.
#
# GTEST_BOTH_LIBRARIES - Both libgtest & libgtest-main
# GTEST_LIBRARIES - libgtest
# GTEST_MAIN_LIBRARIES - libgtest-main
#
# Accepts the following variables as input:
#
# GTEST_ROOT - (as a CMake or environment variable)
# The root directory of the gtest install prefix
#
# GTEST_MSVC_SEARCH - If compiling with MSVC, this variable can be set to
# "MD" or "MT" to enable searching a GTest build tree
# (defaults: "MD")
#
#-----------------------
# Example Usage:
#
# enable_testing()
# find_package(GTest REQUIRED)
# include_directories(${GTEST_INCLUDE_DIRS})
#
# add_executable(foo foo.cc)
# target_link_libraries(foo ${GTEST_BOTH_LIBRARIES})
#
# add_test(AllTestsInFoo foo)
#
#-----------------------
#
# If you would like each Google test to show up in CTest as
# a test you may use the following macro.
# NOTE: It will slow down your tests by running an executable
# for each test and test fixture. You will also have to rerun
# CMake after adding or removing tests or test fixtures.
#
# GTEST_ADD_TESTS(executable extra_args ARGN)
# executable = The path to the test executable
# extra_args = Pass a list of extra arguments to be passed to
# executable enclosed in quotes (or "" for none)
# ARGN = A list of source files to search for tests & test
# fixtures.
#
# Example:
# set(FooTestArgs --foo 1 --bar 2)
# add_executable(FooTest FooUnitTest.cc)
# GTEST_ADD_TESTS(FooTest "${FooTestArgs}" FooUnitTest.cc)
#=============================================================================
# Copyright 2009 Kitware, Inc.
# Copyright 2009 Philip Lowman
# Copyright 2009 Daniel Blezek
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
#
# Thanks to Daniel Blezek for the GTEST_ADD_TESTS code
function(GTEST_ADD_TESTS executable extra_args)
if(NOT ARGN)
message(FATAL_ERROR "Missing ARGN: Read the documentation for GTEST_ADD_TESTS")
endif()
foreach(source ${ARGN})
file(READ "${source}" contents)
string(REGEX MATCHALL "TEST_?F?\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents})
foreach(hit ${found_tests})
string(REGEX REPLACE ".*\\( *([A-Za-z_0-9]+), *([A-Za-z_0-9]+) *\\).*" "\\1.\\2" test_name ${hit})
add_test(${test_name} ${executable} --gtest_filter=${test_name} ${extra_args})
list(APPEND _test_names ${test_name})
endforeach()
endforeach()
set(GTEST_ADD_TEST_NAMES ${_test_names} PARENT_SCOPE)
endfunction()
function(_gtest_append_debugs _endvar _library)
if(${_library} AND ${_library}_DEBUG)
set(_output optimized ${${_library}} debug ${${_library}_DEBUG})
else()
set(_output ${${_library}})
endif()
set(${_endvar} ${_output} PARENT_SCOPE)
endfunction()
function(_gtest_find_library _name)
find_library(${_name}
NAMES ${ARGN}
HINTS
$ENV{GTEST_ROOT}
${GTEST_ROOT}
PATH_SUFFIXES ${_gtest_libpath_suffixes}
)
mark_as_advanced(${_name})
endfunction()
#
if(NOT DEFINED GTEST_MSVC_SEARCH)
set(GTEST_MSVC_SEARCH MD)
endif()
set(_gtest_libpath_suffixes lib)
if(MSVC)
if(GTEST_MSVC_SEARCH STREQUAL "MD")
list(APPEND _gtest_libpath_suffixes
msvc/gtest-md/Debug
msvc/gtest-md/Release)
elseif(GTEST_MSVC_SEARCH STREQUAL "MT")
list(APPEND _gtest_libpath_suffixes
msvc/gtest/Debug
msvc/gtest/Release)
endif()
endif()
find_path(GTEST_INCLUDE_DIR gtest/gtest.h
HINTS
$ENV{GTEST_ROOT}/include
${GTEST_ROOT}/include
)
mark_as_advanced(GTEST_INCLUDE_DIR)
if(MSVC AND GTEST_MSVC_SEARCH STREQUAL "MD")
# The provided /MD project files for Google Test add -md suffixes to the
# library names.
_gtest_find_library(GTEST_LIBRARY gtest-md gtest)
_gtest_find_library(GTEST_LIBRARY_DEBUG gtest-mdd gtestd)
_gtest_find_library(GTEST_MAIN_LIBRARY gtest_main-md gtest_main)
_gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_main-mdd gtest_maind)
else()
_gtest_find_library(GTEST_LIBRARY gtest)
_gtest_find_library(GTEST_LIBRARY_DEBUG gtestd)
_gtest_find_library(GTEST_MAIN_LIBRARY gtest_main)
_gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_maind)
endif()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTest DEFAULT_MSG GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
if(GTEST_FOUND)
set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIR})
_gtest_append_debugs(GTEST_LIBRARIES GTEST_LIBRARY)
_gtest_append_debugs(GTEST_MAIN_LIBRARIES GTEST_MAIN_LIBRARY)
set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES})
endif() easyloggingpp-9.96.7/cmake/easyloggingpp.pc.cmakein 0000664 0000000 0000000 00000000313 13376062224 0022362 0 ustar 00root root 0000000 0000000 Name: easyloggingpp
Description: Feature-rich single header C++ logging library
Version: @ELPP_VERSION_STRING@
prefix=@CMAKE_INSTALL_PREFIX@
includedir=@ELPP_INCLUDE_INSTALL_DIR@
Cflags: -I${includedir}
easyloggingpp-9.96.7/doc/ 0000775 0000000 0000000 00000000000 13376062224 0015250 5 ustar 00root root 0000000 0000000 easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.00 0000664 0000000 0000000 00000004645 13376062224 0017724 0 ustar 00root root 0000000 0000000
Easylogging++ v9.00 RELEASE NOTES
---------------------------------
==========================
= DEPRECATED COMPONENTS =
==========================
- Support for C++98 and C++03 is dropped in favour of performance improvements
- Dropped QA Level
- Dropped support for checking whitespaces within level/configuration name from configuration file
- Replaced escape character from 'E' to '%'
- Renamed namespaces (easyloggingpp => el, internal => base, utilities => utils)
- Renamed internal classes (StringUtils => Str, OSUtils => OS, DateUtils => DateTime)
- Avoid direct copy/assignment for classes, i.e, Configurations c2 = c is incorrect; Configurations c2; c2 = c; is correct
- Changed comment style for configuration from // to ##
- Some Loggers static functions have been moved to new el::Helpers e.g, setApplicationArguments
- Renamed RollOutSize -> MaxLogFileSize (MAX_LOG_FILE_SIZE for configuration file)
- Renamed Level::All -> Level::Global
===========================
= NEW FEATURES =
===========================
- Added support for milliseconds width for VC++
- Crash handling
- Stacktrace printing
- Customizable date/time format (issue #48)
- Support for Qt/QByteArray logging
- Introduced vmodule support to specify verbose logging levels by modules
- Introduced el::LoggingFlag
- Introduced global configurations (Configuring all loggers and registering new loggers right from configuration file)
- Changed licence to MIT to support any type of project
- Dedicated website (easylogging.org)
- Dedicated support email (support@easy..)
- Support for Visual C++ 2013 (Tested with preview)
============================
= DROPPED SUPPORT =
============================
- Dropped support for Android NDK (Code not deleted as it is on to-do list to fix it for future version)
============================
= BUG FIXES =
============================
- Issue with creating 1000+ loggers (issue #66)
- Issue with occasional logging offset
- Fixed clang++ extra warnings
==========================
= NOTES =
==========================
- If you have any confusions refer to reference manual (github readme)
- If you still have confusions please feel free to email
- There is very less backward compatibility because of major design improvements - since now library is on better track future versions will be made backward compatible (with minimum v9.00 compatible).
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.01 0000664 0000000 0000000 00000001145 13376062224 0017715 0 ustar 00root root 0000000 0000000
Easylogging++ v9.01 RELEASE NOTES
---------------------------------
===========================
= NEW FEATURES =
===========================
- Failed check should be embedded in square brackets (issue #86)
- Default log file using macro `_ELPP_DEFAULT_LOG_FILE` (if available)
============================
= BUG FIXES =
============================
- Issue with creating shared library that uses easylogging++ (issue #85)
==========================
= NOTES =
==========================
- Default log location for *nix is in project location logs/ directory
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.02 0000664 0000000 0000000 00000000560 13376062224 0017716 0 ustar 00root root 0000000 0000000
Easylogging++ v9.02 RELEASE NOTES
---------------------------------
============================
= BUG FIXES =
============================
- Minor warning fix with clang++
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.03 0000664 0000000 0000000 00000000623 13376062224 0017717 0 ustar 00root root 0000000 0000000
Easylogging++ v9.03 RELEASE NOTES
---------------------------------
============================
= BUG FIXES =
============================
- Issue with preloading library that uses easylogging++ (issue #87)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.04 0000664 0000000 0000000 00000000411 13376062224 0017713 0 ustar 00root root 0000000 0000000
Easylogging++ v9.04 RELEASE NOTES
---------------------------------
==========================
= NOTES =
==========================
- Minor refactoring
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.05 0000664 0000000 0000000 00000001200 13376062224 0017711 0 ustar 00root root 0000000 0000000
Easylogging++ v9.05 RELEASE NOTES
---------------------------------
==========================
= BUG FIXES =
==========================
- Error while generating stack trace on crash when stacktrace is active (issue #88)
==========================
= NEW FEATURES =
==========================
- Ability to choose detailed crash reason (issue #90)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.06 0000664 0000000 0000000 00000001136 13376062224 0017722 0 ustar 00root root 0000000 0000000
Easylogging++ v9.06 RELEASE NOTES
---------------------------------
==========================
= BUG FIXES =
==========================
- std::unordered_set error (issue #91)
==========================
= NEW FEATURES =
==========================
- Add support for missing boost::container templates (issue #89)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.07 0000664 0000000 0000000 00000001035 13376062224 0017721 0 ustar 00root root 0000000 0000000
Easylogging++ v9.07 RELEASE NOTES
---------------------------------
==========================
= BUG FIXES =
==========================
==========================
= NEW FEATURES =
==========================
- Added Cygwin Compatibility (issue #93)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.08 0000664 0000000 0000000 00000000724 13376062224 0017726 0 ustar 00root root 0000000 0000000
Easylogging++ v9.08 RELEASE NOTES
---------------------------------
==========================
= BUG FIXES =
==========================
- Issue with fatal log being disabled (issue #94)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.09 0000664 0000000 0000000 00000001405 13376062224 0017724 0 ustar 00root root 0000000 0000000
Easylogging++ v9.09 RELEASE NOTES
---------------------------------
==========================
= NEW FEATURES =
==========================
- Support for wxWidgets containers (issue #60)
==========================
= BUG FIXES =
==========================
- NewLineForContainer does not work for Qt containers that dont use writeIterator (isue #96)
==========================
= REFACTORING =
==========================
- Seperated writer from dispatcher + log class
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.10 0000664 0000000 0000000 00000000764 13376062224 0017723 0 ustar 00root root 0000000 0000000
Easylogging++ v9.10 RELEASE NOTES
---------------------------------
==========================
= BUG FIXES =
==========================
- Some issues with timeval not declared being struct caused issues with some libs
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.11 0000664 0000000 0000000 00000001330 13376062224 0017712 0 ustar 00root root 0000000 0000000
Easylogging++ v9.11 RELEASE NOTES
---------------------------------
==========================
= BUG FIXES =
==========================
- Fix for TDM GCC date/time issue
==========================
= NEW FEATURES =
==========================
- Logger not registered error now uses 'default' logger
- Android support added
- Support for TDM GCC compilers
- Qt logging does not need QT_CORE_LIB macro anymore for necessities support
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.12 0000664 0000000 0000000 00000001375 13376062224 0017724 0 ustar 00root root 0000000 0000000
Easylogging++ v9.12 RELEASE NOTES
---------------------------------
==========================
= NEW FEATURES =
==========================
- Ability to log third-party classes (issue #97)
- Class to extend to make class loggable (issue #98)
==========================
= IMPROVEMENTS =
==========================
- CHECK_NOTNULL() to expand to fully qualified function name
- CHECK_EQ and CHECK_NE expands to use CHECK
- Inlined some methods for performance improvements
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.13 0000664 0000000 0000000 00000001160 13376062224 0017715 0 ustar 00root root 0000000 0000000
Easylogging++ v9.13 RELEASE NOTES
---------------------------------
=====================
= NEW FEATURES =
=====================
- 'logs' directory is made automatically (issue #99)
==========================
= INTERNALS =
==========================
- Easylogging++ internal errors are enabled on defining macro `_ELPP_ENABLE_ERRORS`
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.14 0000664 0000000 0000000 00000000751 13376062224 0017723 0 ustar 00root root 0000000 0000000
Easylogging++ v9.14 RELEASE NOTES
---------------------------------
==========================
= BUG FIXES =
==========================
- Fixes issues with valgrind when no default file is used (issue #100)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.15 0000664 0000000 0000000 00000000711 13376062224 0017720 0 ustar 00root root 0000000 0000000
Easylogging++ v9.15 RELEASE NOTES
---------------------------------
=============================
= IMPROVEMENTS =
=============================
- Warnings fixes (issue #101)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.16 0000664 0000000 0000000 00000001225 13376062224 0017722 0 ustar 00root root 0000000 0000000
Easylogging++ v9.16 RELEASE NOTES
---------------------------------
=============================
= IMPROVEMENTS =
=============================
- Suppressed unused warning for default filename constant (only clang)
- Some serious steps taken for future release to have less warnings - made all samples -pedantic-errors + -Wfatal-errors (note: samples are part of build-tests)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.17 0000664 0000000 0000000 00000001236 13376062224 0017725 0 ustar 00root root 0000000 0000000
Easylogging++ v9.17 RELEASE NOTES
---------------------------------
=============================
= NEW FEATURES =
=============================
- Add a format specifier to log filename and line number (issue #103)
=============================
= IMPROVEMENTS =
=============================
- Assertion failure and does not process when configuratoin file does not exist
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.18 0000664 0000000 0000000 00000001606 13376062224 0017727 0 ustar 00root root 0000000 0000000
Easylogging++ v9.18 RELEASE NOTES
---------------------------------
==========================
= FIXES =
==========================
- Completely dithced away QA logging even macros unusable
- Fixed some of verbose logging macro expansions
==========================
= NEW FEATURES =
==========================
- Only allow aplha-numeric (+ some symbols) for logger names (issue #105)
- Case insensitive app args (issue #106)
- Helper to reconfigure specific level for all loggers (issue #107)
- DCHECK macros for debug mode checks (issue #108)
- Added `bool Loggers::hasLogger(const std::string&)`
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.19 0000664 0000000 0000000 00000000760 13376062224 0017730 0 ustar 00root root 0000000 0000000
Easylogging++ v9.19 RELEASE NOTES
---------------------------------
==========================
= FIXES =
==========================
- Some internal code refactor
- Issue with clang++ on mac fixes (issue #111)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.20 0000664 0000000 0000000 00000001552 13376062224 0017720 0 ustar 00root root 0000000 0000000 Easylogging++ v9.20 RELEASE NOTES
---------------------------------
==========================
= NEW FEATURES =
==========================
- Introduced `el::Helpers::convertTemplateToStdString` for loggable classes (and other classes) to return `std::string` from easylogging++ friendly templates (issue #114)
- Introduced `el::Helpers::commandLineArgs` for reading command line arguments provided
- Quoted values in configurations can have double quotes by escaping them using `\` (issue #113)
- Helper to configure easylogging++ loggers (global conf) from command line argument (issue #115)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.21 0000664 0000000 0000000 00000001635 13376062224 0017723 0 ustar 00root root 0000000 0000000 Easylogging++ v9.21 RELEASE NOTES
---------------------------------
==========================
= REFACTORING =
==========================
- Removed some unnecessary code
- Removed licence full detail, instead added link to it
- Removed unnecessary methods from VersionInfo static class, just left `version()` and `releaseDate()`
==========================
= BUG FIXES =
==========================
- Configuring same logger twice loses some information (issue #116)
==========================
= NEW FEATRUES =
==========================
- Added base configurations pointer to `parseFromText` same as `parseFromFile`
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.22 0000664 0000000 0000000 00000001004 13376062224 0017712 0 ustar 00root root 0000000 0000000 Easylogging++ v9.22 RELEASE NOTES
---------------------------------
==========================
= REFACTORING =
==========================
- Declared licence as the MIT licence in top comments to avoid confusions for open-source projects
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.23 0000664 0000000 0000000 00000001542 13376062224 0017722 0 ustar 00root root 0000000 0000000 Easylogging++ v9.23 RELEASE NOTES
---------------------------------
==========================
= DEPRECATED =
==========================
- `_ELPP_PREVENT_FATAL_ABORT` is replaced with `el::LoggingFlag::DisableApplicationAbortOnFatalLog` (issue #119)
==========================
= NEW FEATURES =
==========================
- Custom installable format specifiers (issue #118)
- Ability to uninstall pre-rollout handler
- New check macros
- CHECK_LT (less-than)
- CHECK_GT (greater-than)
- CHECK_LE (less-than or equal)
- CHECK_GE (greater-than or equal)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.24 0000664 0000000 0000000 00000001445 13376062224 0017725 0 ustar 00root root 0000000 0000000 Easylogging++ v9.24 RELEASE NOTES
---------------------------------
==========================
= FIXES =
==========================
- `strerror` CRT warning fix for VC++ when using PLOG() or any equivalent (issue# 123)
- Fixed `CVERBOSE_EVERY_N` resolution from `VLOG_IF` to custom logger verbose log
==========================
= NEW FEATURES =
==========================
- New helper `reconfigureLogger(const std::string&, const ConfigurationType&, const std::string&)`
- Support for syslog (issue #120)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.25 0000664 0000000 0000000 00000003633 13376062224 0017727 0 ustar 00root root 0000000 0000000 Easylogging++ v9.25 RELEASE NOTES
---------------------------------
==========================
= FIXES =
==========================
- Month (numeric) is not correct in %datetime (issue #125)
- Massive improvement for each log entry (issue #124)
- Fix to log format like `%%logger %logger %%logger %msg`
==========================
= NEW FEATURES =
==========================
- Default log file using command line args (issue #122)
- Introduced `LoggingFlag::ImmediateFlush` for performance imporvement (issue #127)
- Introduced `ConfigurationType::LogFlushThreshold` to manually specify log flush threshold (issue #126)
- Introduced `Logger::flush` family and `Loggers::flushAll` family of function to manually flush log files (issue #128)
- Introduced command line arg to enable/disable logging flag using `--logging-flags` param (issue #129)
- Abort warning on fatal log
- Renamed `TIMED_BLOCK` to `TIMED_SCOPE` and introduced new `TIMED_BLOCK` that can be used like `TIMED_BLOCK(obj, "blk") { ... }`
- Now aborts application on crashes etc (as opposed to `exit(status)`) and contains `status` and `reason` params to make it easy to debug using IDE like VS
- Introduced mor params in `el::Helpers::crashAbort` to specify the location and be helpful while debugging
==========================
= DEPRECATED =
==========================
- Replaced format specifier `%log` with `%msg` (issue #131)
- Replaced `_ELPP_STRICT_SIZE_CHECK` macro with `LoggingFlag::StrictLogFileSizeCheck` (issue #130)
==========================
= NOTES =
==========================
- As soon as you upgrade, you will want to replace existing `TIMED_BLOCK` with `TIMED_SCOPE` to prevent any undefined behaviour
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.26 0000664 0000000 0000000 00000001604 13376062224 0017724 0 ustar 00root root 0000000 0000000 Easylogging++ v9.26 RELEASE NOTES
---------------------------------
==========================
= NEW FEATURES =
==========================
- Debug version of PLOG (issue #133)
- Debug version of SYSLOG
- Introduced `PostLogDispatchHandler` to write your own handler for any action after log is dispatched
- Introduced `LoggingFlag::ColoredTerminalOutput` to support colorful output if supported by terminal
===========================
= API CHANGES =
===========================
- `el::base::PreRollOutHandler` has moved to `el::PreRollOutHandler`
- `el::base::LogMessage` has moved to `el::LogMessage`
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.27 0000664 0000000 0000000 00000000724 13376062224 0017727 0 ustar 00root root 0000000 0000000 Easylogging++ v9.27 RELEASE NOTES
---------------------------------
=======================
= FIXES =
=======================
- Emergency fix for multiple-definition bug caused by v9.26
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.28 0000664 0000000 0000000 00000001012 13376062224 0017717 0 ustar 00root root 0000000 0000000 Easylogging++ v9.28 RELEASE NOTES
---------------------------------
==========================
= IMPROVEMENTS =
==========================
- One time resolution for currentUser, currentHost and terminalSupportsColor for performance improvement
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.29 0000664 0000000 0000000 00000000736 13376062224 0017734 0 ustar 00root root 0000000 0000000 Easylogging++ v9.29 RELEASE NOTES
---------------------------------
==========================
= IMPROVEMENTS =
==========================
- Better way to deal with PLOG and perror using PErrorWriter
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.30 0000664 0000000 0000000 00000001056 13376062224 0017720 0 ustar 00root root 0000000 0000000 Easylogging++ v9.30 RELEASE NOTES
---------------------------------
=========================
= FIXES =
=========================
- Fixes to clang++ 3.4+
=========================
= REFACTORING =
=========================
- Removed unused variable m_postStream
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.31 0000664 0000000 0000000 00000000715 13376062224 0017722 0 ustar 00root root 0000000 0000000 Easylogging++ v9.31 RELEASE NOTES
---------------------------------
=========================
= FIXES =
=========================
- Fixes for Intel C++ after updated to g++ 4.8
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.32 0000664 0000000 0000000 00000001225 13376062224 0017720 0 ustar 00root root 0000000 0000000 Easylogging++ v9.32 RELEASE NOTES
---------------------------------
=========================
= NEW FEATURES =
=========================
- Unicode support (enabled when `_ELPP_UNICODE` is defined)
=========================
= API CHANGES =
=========================
- It is recommended to use `el::base::types::ostream_t` in `el::Loggable` to make it happier with unicode
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.33 0000664 0000000 0000000 00000000717 13376062224 0017726 0 ustar 00root root 0000000 0000000 Easylogging++ v9.33 RELEASE NOTES
---------------------------------
=========================
= REFACTORING =
=========================
- Includes only when UNICODE is enabled
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.34 0000664 0000000 0000000 00000001051 13376062224 0017717 0 ustar 00root root 0000000 0000000 Easylogging++ v9.34 RELEASE NOTES
---------------------------------
=========================
= FIXES =
=========================
- Fixes to Trackable after Unicode (this also fixes VC++ 2013 compilation)
- Fixes MAKE_CONTAINER_ELPP_FRIENDLY to be generic for UNICODE
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.35 0000664 0000000 0000000 00000000701 13376062224 0017721 0 ustar 00root root 0000000 0000000 Easylogging++ v9.35 RELEASE NOTES
---------------------------------
=========================
= FIXES =
=========================
- UNICODE fix for wstring operator
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.36 0000664 0000000 0000000 00000001473 13376062224 0017731 0 ustar 00root root 0000000 0000000 Easylogging++ v9.36 RELEASE NOTES
---------------------------------
============================
= REFACTOR =
============================
- Happy Google C++ style guide (cpplint.py) - Lambda semi-colon and line length is left as-is
- API changes to use pointers instead of reference e.g, `populateAllLoggerIds(std::vector&)` to `populateAllLoggerIds(std::vector*)`
==========================
= FIXES =
==========================
- Fixed `TIMED_BLOCK` to reflect `_ELPP_PERFORMANCE_MICROSECONDS`
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.37 0000664 0000000 0000000 00000000725 13376062224 0017731 0 ustar 00root root 0000000 0000000 Easylogging++ v9.37 RELEASE NOTES
---------------------------------
==========================
= FIXES =
==========================
- Fixed issue with EnumType and unicode (issue 137)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.38 0000664 0000000 0000000 00000001024 13376062224 0017723 0 ustar 00root root 0000000 0000000 Easylogging++ v9.38 RELEASE NOTES
---------------------------------
=================================
= NEW FEATURES =
=================================
- Define `_LOGGER` before include to use specified logger, e.g, `#define _LOGGER "my_logger"`
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.39 0000664 0000000 0000000 00000000762 13376062224 0017734 0 ustar 00root root 0000000 0000000 Easylogging++ v9.39 RELEASE NOTES
---------------------------------
==============================
= BUG FIXES =
==============================
- Issue with disabling logs when using manipulators e.g, `std::endl`
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.40 0000664 0000000 0000000 00000001261 13376062224 0017717 0 ustar 00root root 0000000 0000000 Easylogging++ v9.40 RELEASE NOTES
---------------------------------
==============================
= NEW FEATURES =
==============================
- Default configuration getter
- Default typed-configuration getter
- Log streams reference (constant) getter for public-use
==============================
= BUG FIXES =
==============================
- Issue with TIMED_FUNC (issue #139)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.41 0000664 0000000 0000000 00000000736 13376062224 0017726 0 ustar 00root root 0000000 0000000 Easylogging++ v9.41 RELEASE NOTES
---------------------------------
==============================
= BUG FIXES =
==============================
- Issue with g++ raised from version 9.4 release
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.42 0000664 0000000 0000000 00000001113 13376062224 0017715 0 ustar 00root root 0000000 0000000 Easylogging++ v9.42 RELEASE NOTES
---------------------------------
==============================
= BUG FIXES =
==============================
- Registry<>::get for VC++ does not have exception catch anymore that caused problems with CDB
- Issue with Visual C++ and `_ELPP_NO_DEFAULT_LOG_FILE` macro
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.43 0000664 0000000 0000000 00000001304 13376062224 0017720 0 ustar 00root root 0000000 0000000 Easylogging++ v9.43 RELEASE NOTES
---------------------------------
==============================
= NEW FEATURES =
==============================
- Introduced `LOG_AFTER_N` and `LOG_N_TIMES` that works pretty much same as `LOG_EVERY_N`
==============================
= BUG FIXES =
==============================
- Issue with Visual C++ and `_ELPP_NO_DEFAULT_LOG_FILE` in reconfiguring logger and flushing
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.44 0000664 0000000 0000000 00000000724 13376062224 0017726 0 ustar 00root root 0000000 0000000 Easylogging++ v9.44 RELEASE NOTES
---------------------------------
==============================
= BUG FIXES =
==============================
- DCCHECK_NULLPTR bug fix (issue #141)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.45 0000664 0000000 0000000 00000000706 13376062224 0017727 0 ustar 00root root 0000000 0000000 Easylogging++ v9.45 RELEASE NOTES
---------------------------------
==============================
= BUG FIXES =
==============================
- PCHECK macro bug fixes
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.46 0000664 0000000 0000000 00000000745 13376062224 0017733 0 ustar 00root root 0000000 0000000 Easylogging++ v9.46 RELEASE NOTES
---------------------------------
==============================
= BUG FIXES =
==============================
- CHECK_EQ and CHECK_STRCASEEQ macro fixes (issue #142)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.47 0000664 0000000 0000000 00000001211 13376062224 0017721 0 ustar 00root root 0000000 0000000 Easylogging++ v9.47 RELEASE NOTES
---------------------------------
==============================
= BUG FIXES =
==============================
- July month abbreviation fix
- Default date/time fix for 'PM' times
========================
= CHANGES =
========================
- `Logger not registered` message now uses debug level instead of error
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.48 0000664 0000000 0000000 00000000616 13376062224 0017732 0 ustar 00root root 0000000 0000000 Easylogging++ v9.48 RELEASE NOTES
---------------------------------
==========================
= NOTES =
==========================
- Licence and copyright info update to start from 2012 to 2014
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.49 0000664 0000000 0000000 00000000736 13376062224 0017736 0 ustar 00root root 0000000 0000000 Easylogging++ v9.49 RELEASE NOTES
---------------------------------
==========================
= NEW FEATURES =
==========================
- Unregisterable loggers using Loggers::unregisterLogger(id)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.50 0000664 0000000 0000000 00000000744 13376062224 0017725 0 ustar 00root root 0000000 0000000 Easylogging++ v9.50 RELEASE NOTES
---------------------------------
=======================
= BUG FIXES =
=======================
- Issue with datetime format (%y and %Y having same behaviour) (issue #144)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.51 0000664 0000000 0000000 00000000746 13376062224 0017730 0 ustar 00root root 0000000 0000000 Easylogging++ v9.51 RELEASE NOTES
---------------------------------
==========================
= NEW FEATURES =
==========================
- Add timestamp to file names in the configuration file (issue #145)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.52 0000664 0000000 0000000 00000000756 13376062224 0017732 0 ustar 00root root 0000000 0000000 Easylogging++ v9.52 RELEASE NOTES
---------------------------------
=======================
= BUG FIXES =
=======================
- Bug fix from ver. 9.51 with unicode support - introduced `_ELPP_FILENAME_TIMESTAMP`
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.53 0000664 0000000 0000000 00000000742 13376062224 0017726 0 ustar 00root root 0000000 0000000 Easylogging++ v9.53 RELEASE NOTES
---------------------------------
=========================
= NEW FEATURES =
=========================
- Removed need of `_ELPP_FILENAME_TIMESTAMP` for filename timestamp
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.54 0000664 0000000 0000000 00000001000 13376062224 0017713 0 ustar 00root root 0000000 0000000 Easylogging++ v9.54 RELEASE NOTES
---------------------------------
=========================
= NEW FEATURES =
=========================
- Ability to capture performance tracking data when performance tracking is finished (issue #148)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.55 0000664 0000000 0000000 00000000717 13376062224 0017732 0 ustar 00root root 0000000 0000000 Easylogging++ v9.55 RELEASE NOTES
---------------------------------
=========================
= NEW FEATURES =
=========================
- FreeBSD build fix (Thanks to Yawning @ Github)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.56 0000664 0000000 0000000 00000001437 13376062224 0017733 0 ustar 00root root 0000000 0000000 Easylogging++ v9.56 RELEASE NOTES
---------------------------------
=========================
= BUG FIXES =
=========================
- Issue with writing unicode characters to file (issue #151)
- Issue with syslog along with unicode support (issue #152)
=========================
= NEW FEATURES =
=========================
- Ability to export symbols for DLL (issue #150)
- Ability to share logging repository (issue #153)
- Ability to force using standard C++ thread using `_ELPP_FORCE_USE_STD_THREAD`
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.57 0000664 0000000 0000000 00000000743 13376062224 0017733 0 ustar 00root root 0000000 0000000 Easylogging++ v9.57 RELEASE NOTES
---------------------------------
=========================
= BUG FIXES =
=========================
- Issue with multithreading and disabled logging levels (issue #155)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.58 0000664 0000000 0000000 00000001331 13376062224 0017726 0 ustar 00root root 0000000 0000000 Easylogging++ v9.58 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
=========================
= REFACTORING =
=========================
- Use `std::string` instead of `const char*` where it does not affect performance.
=========================
= BUG FIXES =
=========================
- Thread ID resolution function returns `std::string` instead of `const char*` to prevent invalid pointers return
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.59 0000664 0000000 0000000 00000001572 13376062224 0017736 0 ustar 00root root 0000000 0000000 Easylogging++ v9.59 RELEASE NOTES
---------------------------------
Release type: Major
API changes: No
=========================
= REFACTORING =
=========================
- Removing trailing spaces and reorder Trackable members class to avoid warning on gcc (issue 158)
==========================
= NEW FEATURES =
==========================
- Ability to use multiple loggers to log single message (needs `_ELPP_MULTI_LOGGER_SUPPORT`) (issue #157)
==========================
= BUG FIXES =
==========================
- Segmentation fault when running shared lib apps (issue #160)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.60 0000664 0000000 0000000 00000001641 13376062224 0017723 0 ustar 00root root 0000000 0000000 Easylogging++ v9.60 RELEASE NOTES
---------------------------------
Release type: Major
API changes: No
==========================
= NEW FEATURES =
==========================
- Support logging from Logger class for compilers with support for variadic templates (issue #162)
==========================
= REFACTORING =
==========================
- File size cut down
- Changed `inline static` to `static inline` for better readability
==========================
= BUG FIXES =
==========================
- Double free corrpution when sharing storage
- Unused variable warning on Windows regarding "nextTok_" (issue #161)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.61 0000664 0000000 0000000 00000001143 13376062224 0017721 0 ustar 00root root 0000000 0000000 Easylogging++ v9.61 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
==========================
= FIXES =
==========================
- Log functions now uses `%v` instead of `%`
==========================
= NEW FEATURES =
==========================
- Type safe internal checks
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.62 0000664 0000000 0000000 00000001011 13376062224 0017714 0 ustar 00root root 0000000 0000000 Easylogging++ v9.62 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
==========================
= BUG FIXES =
==========================
- Fix to `Logger::verbose` checking whether verbosity is on or not
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.63 0000664 0000000 0000000 00000001047 13376062224 0017726 0 ustar 00root root 0000000 0000000 Easylogging++ v9.63 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
==========================
= BUG FIXES =
==========================
- Issue with multi-threading fixed for verbose logging not on (multi-threaded applications only)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.64 0000664 0000000 0000000 00000006022 13376062224 0017725 0 ustar 00root root 0000000 0000000 Easylogging++ v9.64 RELEASE NOTES
---------------------------------
Release type: Major
API changes: Yes
==========================
= BUG FIXES =
==========================
- Fixes for some STL containers for unicode
- Sample fixes for unicode
- Made `log()` private because some stuffs do not work properly (e.g, `_ELPP_{level}_LOGS` macros)
- Fix line number to zero when using `log()` and friend functions
- Fix log enabled/disabled for `_ELPP_INFO_LOG` and friends for `log()` and friends
- Made `Loggers::getLogger`, `Loggers::hasLogger` and `Loggers::unregisterLogger` thread-safe
==========================
= NEW FEATURES =
==========================
- Ability to enable / disable hierarchical logging using `LoggingFlag::HierarchicalLogging` and `Loggers::setLoggingLevel` (issue #167)
- Ability to disable performance tracking dispatch by using flag `LoggingFlag::DisablePerformanceTrackingDispatch' (issue #164)
- Ability to check datatype for PostPerformanceTrackingData (using `PostPerformanceTrackingData::dataType()`)
- Added `LoggingFlag::MultiLoggerSupport` and removed `_ELPP_MULTI_LOGGER_SUPPORT` macro (issue #166)
- Added `LoggingFlag::PerformanceTrackingCallback` and removed need to define `_ELPP_HANDLE_POST_PERFORMANCE_TRACKING` macro (issue #166)
- Replaced macro `_ELPP_HANDLE_POST_LOG_DISPATCH` with `LoggingFlag::EnableLogDispatchCallback` (issue #166)
==========================
= REFACTORING =
==========================
- Changed `_ELPP_DISABLE_LOGGING_FLAGS_FROM_ARG` to `_ELPP_LOGGING_FLAGS_FROM_ARG` and inverted the logic (issue #163)
- Renamed `Trackable` class to `PerformanceTracker` (issue #163)
- A lot of internal refactoring for performance and size (issue #163)
- Added internal error when too many arguments provided in `log()` and friends
- Moved `addFlag(LoggingFlag)`, `removeFlag(LoggingFlag)` and `hasFlag(LoggingFlag)` to `el::Loggers` (issue #163)
- Renamed following macros: (issue #163)
- `_ELPP_STOP_ON_FIRST_ASSERTION` to `_ELPP_DEBUG_ASSERT_FAILURE`
- `_ELPP_ENABLE_ERRORS` to `_ELPP_DEBUG_ERRORS`
- `_ELPP_ENABLE_INFO` to `_ELPP_DEBUG_INFO`
- Removed `_ELPP_STRICT_SIZE_CHECK` macro and left it on user to add flag `LoggingFlag::StrictLogFileSizeCheck` (issue #166)
- Removed `_ELPP_PERFORMANCE_DISABLE_COMPARE_CHECKPOINTS` macro and left it on user to add flag `LoggingFlag::DisablePerformanceTrackingCheckpointComparison` (issue #166)
- Changed handlers name: (issue #165)
- `PreRollOutHandler` to `PreRollOutCallback`
- `PostLogDispatchHandler` to `LogDispatchCallback`
- `PostPerformanceTrackingHandler` to `PerformanceTrackingCallback`
- Moved `el::api::*` to `el::*`
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.64/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.65 0000664 0000000 0000000 00000001173 13376062224 0017730 0 ustar 00root root 0000000 0000000 Easylogging++ v9.65 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
==========================
= NEW FEATURES =
==========================
- Ability to create loggers on the fly `LoggingFlag::CreateLoggerAutomatically`
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.65/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.66 0000664 0000000 0000000 00000001346 13376062224 0017733 0 ustar 00root root 0000000 0000000 Easylogging++ v9.66 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
========================
= BUG FIXES =
========================
- Verbose fix when using `Logger::verbose`
==========================
= IMPROVEMENTS =
==========================
- Changed `func` and `file` to `FUNCTION` and `FILE` respectively
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.66/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.67 0000664 0000000 0000000 00000001222 13376062224 0017725 0 ustar 00root root 0000000 0000000 Easylogging++ v9.67 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
===========================
= IMPROVEMENTS =
===========================
- Fix to file stream handling if unable to create file stream
- Fixed android (NDK) build warnings
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.67/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.68 0000664 0000000 0000000 00000001133 13376062224 0017727 0 ustar 00root root 0000000 0000000 Easylogging++ v9.68 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
===========================
= IMPROVEMENTS =
===========================
- Ability to change internal debugging macro
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.68/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.69 0000664 0000000 0000000 00000001320 13376062224 0017726 0 ustar 00root root 0000000 0000000 Easylogging++ v9.69 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: Yes
===========================
= IMPROVEMENTS =
===========================
- Multiple log dispatch call backs by extending `el::LogDispatchCallback`
- Ability to log from `el::LogDispatchCallback` with no problems with recursive calls
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.69/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.70 0000664 0000000 0000000 00000002231 13376062224 0017720 0 ustar 00root root 0000000 0000000 Easylogging++ v9.70 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: Yes
===========================
= IMPROVEMENTS =
===========================
- Improvements to `PerformanceTrackingCallback` - multiple callbacks
- Removed ability to log from log dispatch and performance tracking callbacks since it causes issue in multi-threaded applications
============================
= REMOVED =
============================
- Removed `el::LoggingFlag::EnableLogDispatchCallback` as it is always enabled now since its used internally
- Removed `el::LoggingFlag::DisablePerformanceTrackingDispatch` as you can do it other way (see samples)
- Removed `el::LoggingFlag::PerformanceTrackingCallback` as it is always enabled now since its used internally
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.70/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.71 0000664 0000000 0000000 00000001107 13376062224 0017722 0 ustar 00root root 0000000 0000000 Easylogging++ v9.71 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
========================
= BUG FIXES =
========================
- Fix to `PERFORMANCE_CHECKPOINT`
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.71/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.72 0000664 0000000 0000000 00000001166 13376062224 0017730 0 ustar 00root root 0000000 0000000 Easylogging++ v9.72 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
========================
= BUG FIXES =
========================
- Using easylogging++ fails in conjunction with WIN32_LEAN_AND_MEAN (issue #171)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.72/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.73 0000664 0000000 0000000 00000001141 13376062224 0017722 0 ustar 00root root 0000000 0000000 Easylogging++ v9.73 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
===========================
= NEW FEATURES =
===========================
- Ability to add spaces automatically (issue #179)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.73/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.74 0000664 0000000 0000000 00000001425 13376062224 0017730 0 ustar 00root root 0000000 0000000 Easylogging++ v9.74 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
===========================
= NEW FEATURES =
===========================
- `fbase` format specifier
- VModule clear module function
- `levshort` format specifier
==========================
= BUG FIXES =
==========================
- Fixes issue with `AutoSpacing` with timing facilities
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.74/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.75 0000664 0000000 0000000 00000001426 13376062224 0017732 0 ustar 00root root 0000000 0000000 Easylogging++ v9.75 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
==========================
= BUG FIXES =
==========================
- Makes Mutex non-copyable (issue #191)
- Fixes issue with `DefaultPerformanceTrackingCallback` (issue #190)
- Fix build for VS2013 under high warnings [warning level 4] (issue #194)
- Fixes a lot of reference to temporary warnings
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.75/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.76 0000664 0000000 0000000 00000001675 13376062224 0017741 0 ustar 00root root 0000000 0000000 Easylogging++ v9.76 RELEASE NOTES
---------------------------------
Release type: Major
API changes: No
==========================
= NEW FEATURES =
==========================
- Experimental asynchronous logging using `_ELPP_EXPERIMENTAL_ASYNC_LOGGING` (issue #202)
- `CHECK_BOUNDS` macro to check boundaries (issue #204)
==========================
= API CHANGES =
==========================
- `Logger::flush(Level, base::type::fstream_t)` and `Logger::isFlushNeeded(Level)` made public
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.76/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
- Removed references to `easylogging.org` as site will no longer service.
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.77 0000664 0000000 0000000 00000001763 13376062224 0017740 0 ustar 00root root 0000000 0000000 Easylogging++ v9.77 RELEASE NOTES
---------------------------------
Release type: Major
API changes: No
==========================
= BUG FIXES =
==========================
- Using _ELPP_DISABLE_ASSERT breaks config file parsing (issue #218)
==========================
= NEW FEATURES =
==========================
- Support for unique unit of measure in performance tracking (issue #208)
- Changing default format from a more localized %d/%M/%Y to ISO 8601 standard (issue #200)
==========================
= BUILD FIX =
==========================
- Warning fix for `sleep`
==========================
= NOTES =
==========================
- Changed donation policy
- See https://github.com/easylogging/easyloggingpp/blob/v9.77/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.78 0000664 0000000 0000000 00000002147 13376062224 0017736 0 ustar 00root root 0000000 0000000 Easylogging++ v9.78 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
==========================
= NEW FEATURES =
==========================
- Ability to add, clear verbose modules on the fly (issue #219)
- Ability to set verbose logging level on the fly (issue #238)
- Solaris support added
==========================
= BUILD FIX =
==========================
- Warning for `nextTok_` in VS2013 (issue #237)
==========================
= BUG FIX =
==========================
- `LoggingFlag::AutoSpacing` does not work with some types (issue #220)
==========================
= NOTES =
==========================
- Experimental async logging only for specific compilers
- Removed `easyloggingpp` as namespace
- Changed support email address
- See https://github.com/easylogging/easyloggingpp/blob/v9.78/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.79 0000664 0000000 0000000 00000007161 13376062224 0017740 0 ustar 00root root 0000000 0000000 Easylogging++ v9.79 RELEASE NOTES
---------------------------------
Release type: Major
API changes: Yes
==========================
= NEW FEATURES =
==========================
- Ability to use `winsock2.h` when `ELPP_WINSOCK2` defined
==========================
= API CHANGES =
==========================
- All the names starting with underscore (_) are updated to not use underscore in the beginning (issue #239)
- `_START_EASYLOGGINGPP` => `START_EASYLOGGINGPP`
- `_INITIALIZE_EASYLOGGINGPP` => `INITIALIZE_EASYLOGGINGPP`
- `_INITIALIZE_NULL_EASYLOGGINGPP` => `INITIALIZE_NULL_EASYLOGGINGPP`
- `_SHARE_EASYLOGGINGPP` => `SHARE_EASYLOGGINGPP`
- `_ELPP_INITI_BASIC_DECLR` => `ELPP_INITI_BASIC_DECLR`
- `_ELPP_INIT_EASYLOGGINGPP` => `ELPP_INIT_EASYLOGGINGPP`
- `_ELPP_DISABLE_DEFAULT_CRASH_HANDLING` => `ELPP_DISABLE_DEFAULT_CRASH_HANDLING`
- `_ELPP_DISABLE_ASSERT` => `ELPP_DISABLE_ASSERT`
- `_ELPP_DEBUG_ASSERT_FAILURE` => `ELPP_DEBUG_ASSERT_FAILURE`
- `_ELPP_STACKTRACE_ON_CRASH` => `ELPP_STACKTRACE_ON_CRASH`
- `_ELPP_EXPORT_SYMBOLS` => `ELPP_EXPORT_SYMBOLS`
- `_ELPP_AS_DLL` => `ELPP_AS_DLL`
- `_ELPP_FORCE_USE_STD_THREAD` => `ELPP_FORCE_USE_STD_THREAD`
- `_ELPP_LOGGING_FLAGS_FROM_ARG` => `ELPP_LOGGING_FLAGS_FROM_ARG`
- `_ELPP_DISABLE_LOGS` => `ELPP_DISABLE_LOGS`
- `_ELPP_DISABLE_DEBUG_LOGS` => `ELPP_DISABLE_DEBUG_LOGS`
- `_ELPP_DISABLE_INFO_LOGS` => `ELPP_DISABLE_INFO_LOGS`
- `_ELPP_DISABLE_WARNING_LOGS` => `ELPP_DISABLE_WARNING_LOGS`
- `_ELPP_DISABLE_ERROR_LOGS` => `ELPP_DISABLE_ERROR_LOGS`
- `_ELPP_DISABLE_FATAL_LOGS` => `ELPP_DISABLE_FATAL_LOGS`
- `_ELPP_DISABLE_TRACE_LOGS` => `ELPP_DISABLE_TRACE_LOGS`
- `_ELPP_DISABLE_VERBOSE_LOGS` => `ELPP_DISABLE_VERBOSE_LOGS`
- `_ELPP_SYSLOG` => `ELPP_SYSLOG`
- `_INIT_SYSLOG` => `ELPP_INITIALIZE_SYSLOG`
- `_ELPP_UNICODE` => `ELPP_UNICODE`
- `_ELPP_EXPERIMENTAL_ASYNC` => `ELPP_EXPERIMENTAL_ASYNC`
- `_ELPP_THREAD_SAFE` => `ELPP_THREAD_SAFE`
- `_ELPP_STL_LOGGING` => `ELPP_STL_LOGGING`
- `_ELPP_LOG_STD_ARRAY` => `ELPP_LOG_STD_ARRAY`
- `_ELPP_LOG_UNORDERED_MAP` => `ELPP_LOG_UNORDERED_MAP`
- `_ELPP_LOG_UNORDERED_MAP` => `ELPP_LOG_UNORDERED_SET`
- `_ELPP_QT_LOGGING` => `ELPP_QT_LOGGING`
- `_ELPP_BOOST_LOGGING` => `ELPP_BOOST_LOGGING`
- `_ELPP_WXWIDGETS_LOGGING` => `ELPP_WXWIDGETS_LOGGING`
- `_ELPP_DEFAULT_LOG_FILE` => `ELPP_DEFAULT_LOG_FILE`
- `_ELPP_DISABLE_LOG_FILE_FROM_ARG` => `ELPP_DISABLE_LOG_FILE_FROM_ARG`
- `_ELPP_DEFAULT_LOG_FILE` => `ELPP_DEFAULT_LOG_FILE`
- `_ELPP_DISABLE_PERFORMANCE_TRACKING` => `ELPP_DISABLE_PERFORMANCE_TRACKING`
- `_CURRENT_FILE_PERFORMANCE_LOGGER_ID` => `ELPP_CURR_FILE_PERFORMANCE_LOGGER`
- `_ELPP_DISABLE_CONFIGURATION_FROM_PROGRAM_ARGS` => `ELPP_DISABLE_CONFIGURATION_FROM_PROGRAM_ARGS`
- `_ELPP_PERFORMANCE_MICROSECONDS` => `ELPP_PERFORMANCE_MICROSECONDS`
- `_CURRENT_FILE_LOGGER_ID` => `ELPP_DEFAULT_LOGGER`
- `_ELPP_NO_DEFAULT_LOG_FILE` => `ELPP_NO_DEFAULT_LOG_FILE`
- `_ELPP_FORCE_ENV_VAR_FROM_BASH` => `ELPP_FORCE_ENV_VAR_FROM_BASH`
- `_ELPP_DISABLE_CUSTOM_FORMAT_SPECIFIERS` => `ELPP_DISABLE_CUSTOM_FORMAT_SPECIFIERS`
- `_ELPP_HANDLE_SIGABRT` => `ELPP_HANDLE_SIGABRT`
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.79/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.80 0000664 0000000 0000000 00000000771 13376062224 0017730 0 ustar 00root root 0000000 0000000 Easylogging++ v9.80 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
==========================
= NOTES =
==========================
- Licence update
- Email update
- See https://github.com/easylogging/easyloggingpp/blob/v9.80/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.81 0000664 0000000 0000000 00000003003 13376062224 0017720 0 ustar 00root root 0000000 0000000 Easylogging++ v9.81 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
==========================
= BUILD FIX =
==========================
- Fix with `-Wundef` compiler flag (issue #221)
- Fix with `-Wswitch-default` compiler flag (issue #221)
- Warning fix for some unused variables
- syslog constant is no longer defined unless `ELPP_SYSLOG` is defined
- use unistd.h -> usleep for async if `std::this_thread::sleep_for` not available by defining `ELPP_NO_SLEEP_FOR` (Only async logging)
- Fixes `std::move` obsolete warning for clang++ 3.7 (issue #315)
- Crash on exit for some platforms when CTRL+C pressed (issue #261)
- Warning fix with clang3.7 (issue #335)
==========================
= NEW FEATURES =
==========================
- `ELPP_CUSTOM_COUT` to define custom standard output (e.g, `std::cerr`) (issue #201)`
- More terminal colors (for INFO, DEBUG and TRACE logs)
- CHECK_NOTNULL for smart pointers (issue #334)
- ELPP_FRESH_LOG_FILE to always start new log file (issue #384)
==========================
= NOTES =
==========================
- CHECK_NOTNULL does not return pointer anymore instead a simple check
- New sample for log rotation added
- See https://github.com/easylogging/easyloggingpp/blob/v9.81/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.82 0000664 0000000 0000000 00000001124 13376062224 0017723 0 ustar 00root root 0000000 0000000 Easylogging++ v9.82 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
==========================
= BUILD FIX =
==========================
- Crash fix with visual C++ (issue #391)
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.82/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.83 0000664 0000000 0000000 00000001046 13376062224 0017727 0 ustar 00root root 0000000 0000000 Easylogging++ v9.83 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
==========================
= NOTES =
==========================
- Fixes version number. Please see previous release notes for actual releases
- See https://github.com/easylogging/easyloggingpp/blob/v9.83/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.84 0000664 0000000 0000000 00000000760 13376062224 0017732 0 ustar 00root root 0000000 0000000 Easylogging++ v9.84 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
==========================
= NOTES =
==========================
- Fixes build for xcode
- See https://github.com/easylogging/easyloggingpp/blob/v9.84/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.85 0000664 0000000 0000000 00000002014 13376062224 0017725 0 ustar 00root root 0000000 0000000 Easylogging++ v9.85 RELEASE NOTES
---------------------------------
Release type: Major
API changes: No
Breaking Change: Yes
- Performance tracker changed from object to pointer
==========================
= FIXES =
==========================
- C++17 Build fix
- Initialize uninitialized variables (cppcheck)
- Do not create any file when using `ELPP_NO_LOG_TO_FILE`
- Fix bad memory access before opening any files
- Documentation updated and fixed typos
==========================
= NEW FEATURES =
==========================
- Added conditional performance tracking via TIMED_FUNC_IF and TIMED_SCOPE_IF (#415)
==========================
= NOTES =
==========================
- Licence update
- See https://github.com/easylogging/easyloggingpp/blob/v9.85/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.86 0000664 0000000 0000000 00000001736 13376062224 0017740 0 ustar 00root root 0000000 0000000 Easylogging++ v9.86 RELEASE NOTES
---------------------------------
Release type: Major
API changes: No
Breaking Change: Yes
==========================
= NEW FEATURES =
==========================
- Stack trace and crash report now requires `ELPP_FEATURE_CRASH_LOG` macro (#409)
- Performance tracking now requires `ELPP_PERFORMANCE_TRACKING` macro defined (#409)
- do(something) || LOG(DEBUG) idiom (#426)
==========================
= FIXES =
==========================
- Do not create default file when using `ELPP_NO_LOG_TO_FILE` (completely fixed)
==========================
= NOTES =
==========================
- Licence now included in releases
- See https://github.com/easylogging/easyloggingpp/blob/v9.86/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.87 0000664 0000000 0000000 00000001217 13376062224 0017733 0 ustar 00root root 0000000 0000000 Easylogging++ v9.87 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
Breaking Change: No
==========================
= NEW FEATURES =
==========================
- do(something) || LOG(LEVEL) idiom for `LOG_EVERY_N`, `LOG_AFTER_N` and family
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.87/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.88 0000664 0000000 0000000 00000001224 13376062224 0017732 0 ustar 00root root 0000000 0000000 Easylogging++ v9.88 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
Breaking Change: No
==========================
= INTERNAL =
==========================
- Some type refactors for better results
- Exposing some functions for external use
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.88/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.89 0000664 0000000 0000000 00000001221 13376062224 0017730 0 ustar 00root root 0000000 0000000 Easylogging++ v9.89 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: Yes
Breaking Change: No
==========================
= NEW FEATURES =
==========================
- New `LoggerRegistrationCallback` API to view / update newly registered loggers
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.89/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.90 0000664 0000000 0000000 00000002733 13376062224 0017731 0 ustar 00root root 0000000 0000000 Easylogging++ v9.90 RELEASE NOTES
---------------------------------
Release type: Major
API changes: Yes
Breaking Change: Yes
This is a major release. We have separated header file in to `easylogging++.h` and `easylogging++.cc`. Source file (`easylogging++.cc`) encompass source to speed up compile time. Thanks to @aparajita.
==========================
= FIXES =
==========================
- Fix to custom datetime format in Unicode mode
==========================
= NEW FEATURES =
==========================
- The `FormatSpecifierValueResolver` function passed to the `CustomFormatSpecifier` constructor
now receives `const LogMessage&` as an argument. This allows you to access message-specific context
(such as the verbose level) within your custom formatting function. For an example, see
samples/STL/custom-format-spec.cpp.
- Separated header and source file (`easylogging++.h` and `easylogging++.cc`) (issue #445)
- New `ELPP_DEFAULT_LOGGING_FLAGS` macro for setting initial logging flags
- C++11 detection is improved, and Clang uses `std::thread` by default if it is available
==========================
= NOTES =
==========================
- See https://github.com/easylogging/easyloggingpp/blob/v9.90/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.91 0000664 0000000 0000000 00000001260 13376062224 0017724 0 ustar 00root root 0000000 0000000 Easylogging++ v9.91 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
Breaking Change: No
==========================
= NEW FEATURES =
==========================
- Deprecated MILLISECONDS_WIDTH and introduced SUBSECOND_PRECISION
==========================
= NOTES =
==========================
- Eased some internal locks around callbacks
- See https://github.com/easylogging/easyloggingpp/blob/v9.91/README.md for manual for this release
- See https://github.com/easylogging/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/easylogging/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.92 0000664 0000000 0000000 00000000771 13376062224 0017733 0 ustar 00root root 0000000 0000000 Easylogging++ v9.92 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
Breaking Change: No
==========================
= NOTES =
==========================
- Updated github repo
- See https://github.com/muflihun/easyloggingpp/blob/v9.92/README.md for manual for this release
- See https://github.com/muflihun/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/muflihun/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.93 0000664 0000000 0000000 00000001566 13376062224 0017737 0 ustar 00root root 0000000 0000000 Easylogging++ v9.93 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
Breaking Change: No
==========================
= FIXES =
==========================
- Multithread storage lock fix
- Dead lock fixes (#417) Thanks to @aparajita for tip
==========================
= FEATURES =
==========================
- Set thread names using new helper `Helpers::setThreadName` and print using new format specifier `%thread_name`
- A lot of sample clean up and fixed
==========================
= NOTES =
==========================
- See https://github.com/muflihun/easyloggingpp/blob/9.93/README.md for manual for this release
- See https://github.com/muflihun/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/muflihun/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/doc/RELEASE-NOTES-v9.94 0000664 0000000 0000000 00000001755 13376062224 0017740 0 ustar 00root root 0000000 0000000 Easylogging++ v9.94 RELEASE NOTES
---------------------------------
Release type: Minor
API changes: No
Breaking Change: No
==========================
= FIXES =
==========================
- Fixed performance tracking time unit and calculations
==========================
= FEATURES =
==========================
- Restored `ELPP_DEFAULT_LOGGER` and `ELPP_DEFAULT_PERFORMANCE_LOGGER`
- Helpers::getThreadName for reading current thread's name
- Custom format specifier now has to return `std::string` instead
- Merged `thread_name` with `thread` if thread name is available it's used otherwise ID is displayed
==========================
= NOTES =
==========================
- See https://github.com/muflihun/easyloggingpp/blob/9.93/README.md for manual for this release
- See https://github.com/muflihun/easyloggingpp/tree/master/doc for other release notes
- Closed issues: https://github.com/muflihun/easyloggingpp/issues?page=1&state=closed
easyloggingpp-9.96.7/samples/ 0000775 0000000 0000000 00000000000 13376062224 0016147 5 ustar 00root root 0000000 0000000 easyloggingpp-9.96.7/samples/.gitignore 0000664 0000000 0000000 00000000006 13376062224 0020133 0 ustar 00root root 0000000 0000000 bin/*
easyloggingpp-9.96.7/samples/API/ 0000775 0000000 0000000 00000000000 13376062224 0016560 5 ustar 00root root 0000000 0000000 easyloggingpp-9.96.7/samples/API/.gitignore 0000664 0000000 0000000 00000000015 13376062224 0020544 0 ustar 00root root 0000000 0000000 bin/*
logs/*
easyloggingpp-9.96.7/samples/API/build_all.sh 0000775 0000000 0000000 00000000361 13376062224 0021046 0 ustar 00root root 0000000 0000000
# Builds all files into bin/
[ -d "bin" ] || mkdir "bin"
rm -rf bin/*
find . -maxdepth 1 -type f -name '*.cpp' -exec sh compile.sh {} $1 \;
echo "Completed!"
files=$(ls -l bin/)
if [ "$files" = "total 0" ];then
exit 1
else
exit 0
fi
easyloggingpp-9.96.7/samples/API/compile.sh 0000775 0000000 0000000 00000001277 13376062224 0020556 0 ustar 00root root 0000000 0000000 ## Helper script for build_all.sh
FILE=$1
macro="$macro -DELPP_THREAD_SAFE"
macro="$macro -DELPP_STL_LOGGING"
macro="$macro -DELPP_LOG_UNORDERED_SET"
macro="$macro -DELPP_LOG_UNORDERED_MAP"
macro="$macro -DELPP_FEATURE_CRASH_LOG"
macro="$macro -DELPP_FEATURE_ALL"
if [ "$2" = "" ];then
COMPILER=g++
else
COMPILER=$2
fi
CXX_STD='-std=c++0x -pthread'
if [ "$FILE" = "" ]; then
echo "Please provide filename to compile"
exit
fi
echo "Compiling... [$FILE]"
COMPILE_LINE="$COMPILER $FILE easylogging++.cc -o bin/$FILE.bin $macro $CXX_STD -Wall -Wextra -pedantic -pedantic-errors -Werror -Wfatal-errors"
echo " $COMPILE_LINE"
$($COMPILE_LINE)
echo " DONE! [./bin/$FILE.bin]"
echo
echo
easyloggingpp-9.96.7/samples/API/easylogging++.cc 0000664 0000000 0000000 00000000046 13376062224 0021525 0 ustar 00root root 0000000 0000000 #include "../../src/easylogging++.cc"
easyloggingpp-9.96.7/samples/API/easylogging++.h 0000664 0000000 0000000 00000000325 13376062224 0021367 0 ustar 00root root 0000000 0000000 // Header for sample that sub-includes original header from src/ folder
#ifndef EASYLOGGING_FOR_SAMPLES_H
#define EASYLOGGING_FOR_SAMPLES_H
#include "../../src/easylogging++.h"
#endif // EASYLOGGING_FOR_SAMPLES_H
easyloggingpp-9.96.7/samples/API/logbuilder.cpp 0000664 0000000 0000000 00000001552 13376062224 0021417 0 ustar 00root root 0000000 0000000 //
// This file is part of Easylogging++ samples
// Simple custom log builder
//
// Revision 1.0
// @author mkhan3189
//
#include "easylogging++.h"
INITIALIZE_EASYLOGGINGPP
/// @brief Not a very fast log builder but good enough for sample
class MyLogBuilder : public el::LogBuilder {
public:
std::string build(const el::LogMessage* logMessage, bool appendNewLine) const {
std::stringstream str;
str << logMessage->message();
if (appendNewLine) str << "\n";
return str.str().c_str();
}
};
int main(void) {
el::LogBuilderPtr myLogBuilder = el::LogBuilderPtr(new MyLogBuilder());
el::Loggers::getLogger("default")->setLogBuilder(myLogBuilder);
LOG(INFO) << "message from default logger";
el::Loggers::getLogger("new_logger");
CLOG(INFO, "new_logger") << "message from new_logger logger";
return 0;
}
easyloggingpp-9.96.7/samples/API/run.sh 0000775 0000000 0000000 00000000066 13376062224 0017725 0 ustar 00root root 0000000 0000000 echo "Running '$1'..."
./$1
echo "Finished '$1'"
echo
easyloggingpp-9.96.7/samples/API/run_all.sh 0000775 0000000 0000000 00000000147 13376062224 0020555 0 ustar 00root root 0000000 0000000 ## Runs all the build binaries from bin/ folder
find bin/ -name '*.cpp.bin' -exec sh ./run.sh ./{} \;
easyloggingpp-9.96.7/samples/MinGW/ 0000775 0000000 0000000 00000000000 13376062224 0017130 5 ustar 00root root 0000000 0000000 easyloggingpp-9.96.7/samples/MinGW/.gitignore 0000664 0000000 0000000 00000000015 13376062224 0021114 0 ustar 00root root 0000000 0000000 logs/*
*.exe
easyloggingpp-9.96.7/samples/MinGW/compile.bat 0000664 0000000 0000000 00000000234 13376062224 0021247 0 ustar 00root root 0000000 0000000 echo Assuming C:\MinGW for MinGW
set path=%path%;C:\MinGW\bin\
"C:\MinGW\bin\g++.exe" -o prog.exe prog.cpp easylogging++.cc -std=c++11 -DELPP_FEATURE_ALL
easyloggingpp-9.96.7/samples/MinGW/easylogging++.cc 0000664 0000000 0000000 00000000046 13376062224 0022075 0 ustar 00root root 0000000 0000000 #include "../../src/easylogging++.cc"
easyloggingpp-9.96.7/samples/MinGW/easylogging++.h 0000664 0000000 0000000 00000000325 13376062224 0021737 0 ustar 00root root 0000000 0000000 // Header for sample that sub-includes original header from src/ folder
#ifndef EASYLOGGING_FOR_SAMPLES_H
#define EASYLOGGING_FOR_SAMPLES_H
#include "../../src/easylogging++.h"
#endif // EASYLOGGING_FOR_SAMPLES_H
easyloggingpp-9.96.7/samples/MinGW/prog.cpp 0000664 0000000 0000000 00000001053 13376062224 0020602 0 ustar 00root root 0000000 0000000 #define ELPP_STL_LOGGING
// #define ELPP_FEATURE_CRASH_LOG -- Stack trace not available for MinGW GCC
#define ELPP_PERFORMANCE_MICROSECONDS
#define ELPP_LOG_STD_ARRAY
#define ELPP_LOG_UNORDERED_MAP
#define ELPP_UNORDERED_SET
#include "easylogging++.h"
INITIALIZE_EASYLOGGINGPP
TIMED_SCOPE(appTimer, "myapplication");
int main(int argc, const char* argv[]) {
el::Loggers::removeFlag(el::LoggingFlag::AllowVerboseIfModuleNotSpecified);
TIMED_BLOCK(itr, "write-simple") {
LOG(INFO) << "Test " << __FILE__;
}
VLOG(3) << "Test";
}
easyloggingpp-9.96.7/samples/OpenGL/ 0000775 0000000 0000000 00000000000 13376062224 0017273 5 ustar 00root root 0000000 0000000 easyloggingpp-9.96.7/samples/OpenGL/.gitignore 0000664 0000000 0000000 00000000015 13376062224 0021257 0 ustar 00root root 0000000 0000000 bin/*
logs/*
easyloggingpp-9.96.7/samples/OpenGL/Cube/ 0000775 0000000 0000000 00000000000 13376062224 0020151 5 ustar 00root root 0000000 0000000 easyloggingpp-9.96.7/samples/OpenGL/Cube/.gitignore 0000664 0000000 0000000 00000000015 13376062224 0022135 0 ustar 00root root 0000000 0000000 bin/*
logs/*
easyloggingpp-9.96.7/samples/OpenGL/Cube/LICENCE 0000664 0000000 0000000 00000002175 13376062224 0021143 0 ustar 00root root 0000000 0000000 Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
File for "Putting It All Together" lesson of the OpenGL tutorial on
www.videotutorialsrock.com
easyloggingpp-9.96.7/samples/OpenGL/Cube/Makefile 0000664 0000000 0000000 00000000444 13376062224 0021613 0 ustar 00root root 0000000 0000000 CC = g++
CFLAGS = -Wall -std=c++11
PROG = cube
SRCS = main.cpp imageloader.cpp
ifeq ($(shell uname),Darwin)
LIBS = -framework OpenGL -framework GLUT
else
LIBS = -lglut -lGLU -lGL
endif
all: $(PROG)
$(PROG): $(SRCS)
$(CC) $(CFLAGS) -o bin/$(PROG) $(SRCS) $(LIBS)
clean:
rm -f $(PROG)
easyloggingpp-9.96.7/samples/OpenGL/Cube/imageloader.cpp 0000664 0000000 0000000 00000013211 13376062224 0023124 0 ustar 00root root 0000000 0000000 #include
#include
#include "imageloader.h"
#include "../easylogging++.h"
using namespace std;
Image::Image(char* ps, int w, int h) : pixels(ps), width(w), height(h) {
VLOG(2) << "Constructing Image object [" << w << " x " << h << "]";
}
Image::~Image() {
VLOG(2) << "Destroying image object...";
delete[] pixels;
}
namespace {
//Converts a four-character array to an integer, using little-endian form
int toInt(const char* bytes) {
VLOG(2) << "Converting bytes to int";
return (int)(((unsigned char)bytes[3] << 24) |
((unsigned char)bytes[2] << 16) |
((unsigned char)bytes[1] << 8) |
(unsigned char)bytes[0]);
}
//Converts a two-character array to a short, using little-endian form
short toShort(const char* bytes) {
VLOG(2) << "Converting bytes to short";
return (short)(((unsigned char)bytes[1] << 8) |
(unsigned char)bytes[0]);
}
//Reads the next four bytes as an integer, using little-endian form
int readInt(ifstream &input) {
VLOG(2) << "Reading input as int...";
char buffer[4];
input.read(buffer, 4);
return toInt(buffer);
}
//Reads the next two bytes as a short, using little-endian form
short readShort(ifstream &input) {
VLOG(2) << "Reading input as short...";
char buffer[2];
input.read(buffer, 2);
return toShort(buffer);
}
//Just like auto_ptr, but for arrays
template
class auto_array {
private:
T* array;
mutable bool isReleased;
public:
explicit auto_array(T* array_ = NULL) :
array(array_), isReleased(false) {
VLOG(2) << "Creating auto_array";
}
auto_array(const auto_array &aarray) {
VLOG(2) << "Copying auto_array";
array = aarray.array;
isReleased = aarray.isReleased;
aarray.isReleased = true;
}
~auto_array() {
VLOG(2) << "Destroying auto_array";
if (!isReleased && array != NULL) {
delete[] array;
}
}
T* get() const {
return array;
}
T &operator*() const {
return *array;
}
void operator=(const auto_array &aarray) {
if (!isReleased && array != NULL) {
delete[] array;
}
array = aarray.array;
isReleased = aarray.isReleased;
aarray.isReleased = true;
}
T* operator->() const {
return array;
}
T* release() {
isReleased = true;
return array;
}
void reset(T* array_ = NULL) {
if (!isReleased && array != NULL) {
delete[] array;
}
array = array_;
}
T* operator+(int i) {
return array + i;
}
T &operator[](int i) {
return array[i];
}
};
}
Image* loadBMP(const char* filename) {
VLOG(1) << "Loading bitmap [" << filename << "]";
ifstream input;
input.open(filename, ifstream::binary);
CHECK(!input.fail()) << "Could not find file";
char buffer[2];
input.read(buffer, 2);
CHECK(buffer[0] == 'B' && buffer[1] == 'M') << "Not a bitmap file";
input.ignore(8);
int dataOffset = readInt(input);
//Read the header
int headerSize = readInt(input);
int width;
int height;
switch(headerSize) {
case 40:
//V3
width = readInt(input);
height = readInt(input);
input.ignore(2);
CHECK_EQ(readShort(input), 24) << "Image is not 24 bits per pixel";
CHECK_EQ(readShort(input), 0) << "Image is compressed";
break;
case 12:
//OS/2 V1
width = readShort(input);
height = readShort(input);
input.ignore(2);
CHECK_EQ(readShort(input), 24) << "Image is not 24 bits per pixel";
break;
case 64:
//OS/2 V2
LOG(FATAL) << "Can't load OS/2 V2 bitmaps";
break;
case 108:
//Windows V4
LOG(FATAL) << "Can't load Windows V4 bitmaps";
break;
case 124:
//Windows V5
LOG(FATAL) << "Can't load Windows V5 bitmaps";
break;
default:
LOG(FATAL) << "Unknown bitmap format";
}
//Read the data
VLOG(1) << "Reading bitmap data";
int bytesPerRow = ((width * 3 + 3) / 4) * 4 - (width * 3 % 4);
int size = bytesPerRow * height;
VLOG(1) << "Size of bitmap is [" << bytesPerRow << " x " << height << " = " << size;
auto_array pixels(new char[size]);
input.seekg(dataOffset, ios_base::beg);
input.read(pixels.get(), size);
//Get the data into the right format
auto_array pixels2(new char[width * height * 3]);
for(int y = 0; y < height; y++) {
for(int x = 0; x < width; x++) {
for(int c = 0; c < 3; c++) {
pixels2[3 * (width * y + x) + c] =
pixels[bytesPerRow * y + 3 * x + (2 - c)];
}
}
}
input.close();
return new Image(pixels2.release(), width, height);
}
easyloggingpp-9.96.7/samples/OpenGL/Cube/imageloader.h 0000664 0000000 0000000 00000001274 13376062224 0022577 0 ustar 00root root 0000000 0000000 #ifndef IMAGE_LOADER_H_INCLUDED
#define IMAGE_LOADER_H_INCLUDED
//Represents an image
class Image {
public:
Image(char* ps, int w, int h);
~Image();
/* An array of the form (R1, G1, B1, R2, G2, B2, ...) indicating the
* color of each pixel in image. Color components range from 0 to 255.
* The array starts the bottom-left pixel, then moves right to the end
* of the row, then moves up to the next column, and so on. This is the
* format in which OpenGL likes images.
*/
char* pixels;
int width;
int height;
};
//Reads a bitmap image from file.
Image* loadBMP(const char* filename);
#endif
easyloggingpp-9.96.7/samples/OpenGL/Cube/main.cpp 0000664 0000000 0000000 00000013116 13376062224 0021603 0 ustar 00root root 0000000 0000000
#include
#include
#ifdef __APPLE__
# include
# include
#else
# include
#endif
#include "../easylogging++.h"
#include "imageloader.h"
INITIALIZE_EASYLOGGINGPP
using namespace std;
const float BOX_SIZE = 7.0f; //The length of each side of the cube
float _angle = 0; //The rotation of the box
GLuint _textureId; //The OpenGL id of the texture
void handleKeypress(unsigned char key, int x, int y) {
switch (key) {
case 27: //Escape key
exit(0);
}
}
//Makes the image into a texture, and returns the id of the texture
GLuint loadTexture(Image* image) {
VLOG(1) << "Loading texture from image...";
GLuint textureId;
glGenTextures(1, &textureId);
glBindTexture(GL_TEXTURE_2D, textureId);
glTexImage2D(GL_TEXTURE_2D,
0,
GL_RGB,
image->width, image->height,
0,
GL_RGB,
GL_UNSIGNED_BYTE,
image->pixels);
return textureId;
}
void initRendering() {
VLOG(1) << "Initializing rendering";
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glEnable(GL_NORMALIZE);
glEnable(GL_COLOR_MATERIAL);
Image* image = loadBMP("vtr.bmp");
_textureId = loadTexture(image);
delete image;
}
void handleResize(int w, int h) {
VLOG(1) << "Resizing to [" << w << " x " << h << "]";
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0, (float)w / (float)h, 1.0, 200.0);
}
void drawScene() {
VLOG(3) << "Drawing scene...";
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.0f, 0.0f, -20.0f);
GLfloat ambientLight[] = {0.3f, 0.3f, 0.3f, 1.0f};
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambientLight);
GLfloat lightColor[] = {0.7f, 0.7f, 0.7f, 1.0f};
GLfloat lightPos[] = {-2 * BOX_SIZE, BOX_SIZE, 4 * BOX_SIZE, 1.0f};
glLightfv(GL_LIGHT0, GL_DIFFUSE, lightColor);
glLightfv(GL_LIGHT0, GL_POSITION, lightPos);
glRotatef(-_angle, 1.0f, 1.0f, 0.0f);
glBegin(GL_QUADS);
//Top face
glColor3f(1.0f, 1.0f, 0.0f);
glNormal3f(0.0, 1.0f, 0.0f);
glVertex3f(-BOX_SIZE / 2, BOX_SIZE / 2, -BOX_SIZE / 2);
glVertex3f(-BOX_SIZE / 2, BOX_SIZE / 2, BOX_SIZE / 2);
glVertex3f(BOX_SIZE / 2, BOX_SIZE / 2, BOX_SIZE / 2);
glVertex3f(BOX_SIZE / 2, BOX_SIZE / 2, -BOX_SIZE / 2);
//Bottom face
glColor3f(1.0f, 0.0f, 1.0f);
glNormal3f(0.0, -1.0f, 0.0f);
glVertex3f(-BOX_SIZE / 2, -BOX_SIZE / 2, -BOX_SIZE / 2);
glVertex3f(BOX_SIZE / 2, -BOX_SIZE / 2, -BOX_SIZE / 2);
glVertex3f(BOX_SIZE / 2, -BOX_SIZE / 2, BOX_SIZE / 2);
glVertex3f(-BOX_SIZE / 2, -BOX_SIZE / 2, BOX_SIZE / 2);
//Left face
glNormal3f(-1.0, 0.0f, 0.0f);
glColor3f(0.0f, 1.0f, 1.0f);
glVertex3f(-BOX_SIZE / 2, -BOX_SIZE / 2, -BOX_SIZE / 2);
glVertex3f(-BOX_SIZE / 2, -BOX_SIZE / 2, BOX_SIZE / 2);
glColor3f(0.0f, 0.0f, 1.0f);
glVertex3f(-BOX_SIZE / 2, BOX_SIZE / 2, BOX_SIZE / 2);
glVertex3f(-BOX_SIZE / 2, BOX_SIZE / 2, -BOX_SIZE / 2);
//Right face
glNormal3f(1.0, 0.0f, 0.0f);
glColor3f(1.0f, 0.0f, 0.0f);
glVertex3f(BOX_SIZE / 2, -BOX_SIZE / 2, -BOX_SIZE / 2);
glVertex3f(BOX_SIZE / 2, BOX_SIZE / 2, -BOX_SIZE / 2);
glColor3f(0.0f, 1.0f, 0.0f);
glVertex3f(BOX_SIZE / 2, BOX_SIZE / 2, BOX_SIZE / 2);
glVertex3f(BOX_SIZE / 2, -BOX_SIZE / 2, BOX_SIZE / 2);
glEnd();
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, _textureId);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glColor3f(1.0f, 1.0f, 1.0f);
glBegin(GL_QUADS);
//Front face
glNormal3f(0.0, 0.0f, 1.0f);
glTexCoord2f(0.0f, 0.0f);
glVertex3f(-BOX_SIZE / 2, -BOX_SIZE / 2, BOX_SIZE / 2);
glTexCoord2f(1.0f, 0.0f);
glVertex3f(BOX_SIZE / 2, -BOX_SIZE / 2, BOX_SIZE / 2);
glTexCoord2f(1.0f, 1.0f);
glVertex3f(BOX_SIZE / 2, BOX_SIZE / 2, BOX_SIZE / 2);
glTexCoord2f(0.0f, 1.0f);
glVertex3f(-BOX_SIZE / 2, BOX_SIZE / 2, BOX_SIZE / 2);
//Back face
glNormal3f(0.0, 0.0f, -1.0f);
glTexCoord2f(0.0f, 0.0f);
glVertex3f(-BOX_SIZE / 2, -BOX_SIZE / 2, -BOX_SIZE / 2);
glTexCoord2f(1.0f, 0.0f);
glVertex3f(-BOX_SIZE / 2, BOX_SIZE / 2, -BOX_SIZE / 2);
glTexCoord2f(1.0f, 1.0f);
glVertex3f(BOX_SIZE / 2, BOX_SIZE / 2, -BOX_SIZE / 2);
glTexCoord2f(0.0f, 1.0f);
glVertex3f(BOX_SIZE / 2, -BOX_SIZE / 2, -BOX_SIZE / 2);
glEnd();
glDisable(GL_TEXTURE_2D);
glutSwapBuffers();
}
//Called every 25 milliseconds
void update(int value) {
_angle += 1.0f;
if (_angle > 360) {
_angle -= 360;
}
VLOG(3) << "Updating ... [angle: " << _angle << "]";
glutPostRedisplay();
glutTimerFunc(25, update, 0);
}
int main(int argc, char** argv) {
START_EASYLOGGINGPP(argc, argv);
LOG(INFO) << "Source base taken from http://www.muflihun.com";
LOG_IF(!VLOG_IS_ON(1), INFO) << "Try using --v=1 or --v=2 or --verbose command line arguments as well";
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(400, 400);
glutCreateWindow("Great Cube Sample");
initRendering();
glutDisplayFunc(drawScene);
glutKeyboardFunc(handleKeypress);
glutReshapeFunc(handleResize);
glutTimerFunc(25, update, 0);
glutMainLoop();
return 0;
}
easyloggingpp-9.96.7/samples/OpenGL/Cube/vtr.bmp 0000664 0000000 0000000 00000600066 13376062224 0021474 0 ustar 00root root 0000000 0000000 BM6 6 ( LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLKl<^5d8}FLLLLLLLLLKl<^4c7}FLLLLLLLLLLLLLLLLLLLLL}Fb6ILLLLLKl<^4c7}FLLLLLLLLKl<^5d8}FLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLb6 7LLLLLLLLLa6 +% H&p>LLLLLLa6 +*T,yCLLLK yCLLLLm= D&LLL@" 3KLLLa6 +*T,yCLLLLLa6 +% H&p>LLLLLb6 7LLLLG JLLLL( |ELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL|E KLLLLLLLj;o>LLo>*[3LLLLj;n=LLxCC#
vBLLL= ^4LLLLF% @"n=xCLLLP* uALLj;n=LLxCC#
vBLLLj;o>LLo>*[3LLLL|E KLLLL! m=LLLLY/ x@#n=ILLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
q?LLLLLLLJ' v>#LLLLzD j;LLLJ' w?#LLLLI'7KLLo;! C%LLLd8 k;LLLLL|Eo;!E'LLLJ' w?#LLLLI'7KLLJ' v>#LLLLzD j;LLLL
q?LLLLR+ R.LLLLI) f6LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL( V0LLLLLLL
V0LLLLLF' .
KLL
W0LLLLLe8k9vBLLU/ M)LLL6 Q+LLLLLLLLLLLL
W0LLLLLe8k9vBLL
V0LLLLLF' .
KLLLL( V0LLLLF' i8LLLLd8 4LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL}B% r