Skip to content

Commit

Permalink
Merge pull request #439 from easylogging/develop
Browse files Browse the repository at this point in the history
v9.89 Release
  • Loading branch information
easylogging committed Dec 31, 2016
2 parents 1c42012 + a442c80 commit fd4a183
Show file tree
Hide file tree
Showing 16 changed files with 181 additions and 237 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build/*
build-*
*.pro.user
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ compiler:
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y libgtest-dev
- "cd /usr/src/gtest && sudo cmake . && sudo cmake --build . && sudo mv libg* /usr/local/lib/ ; cd -"
- "cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv libgtest* /usr/lib/ ; cd \"${TRAVIS_BUILD_DIR}\""
before_script:
- pwd
- cd samples/STL/
Expand Down
27 changes: 3 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,9 @@
#==============================================================================
# Copyright (c) 2015 Frozen Team.
#
# 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.
#==============================================================================
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.1)

project(Easyloggingpp CXX)

set(ELPP_MAJOR_VERSION "9")
set(ELPP_MINOR_VERSION "80")
set(ELPP_MINOR_VERSION "89")
set(ELPP_VERSION_STRING "${ELPP_MAJOR_VERSION}.${ELPP_MINOR_VERSION}")

set(ELPP_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The directory the headers are installed in")
Expand All @@ -35,4 +14,4 @@ install(FILES src/easylogging++.h
DESTINATION "${ELPP_INCLUDE_INSTALL_DIR}"
COMPONENT dev)

export(PACKAGE ${PROJECT_NAME})
export(PACKAGE ${PROJECT_NAME})
50 changes: 23 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
‫بسم الله الرَّحْمَنِ الرَّحِيمِ


> **Manual For v9.88**
> **Manual For v9.89**
>
> [![Build Status](https://travis-ci.org/easylogging/easyloggingpp.png?branch=develop)](https://travis-ci.org/easylogging/easyloggingpp)
### Quick Links

[![download] Latest Release](https://github.com/easylogging/easyloggingpp/releases/latest)

[![notes] Release Notes](https://github.com/easylogging/easyloggingpp/tree/master/doc/RELEASE-NOTES-v9.88)
[![notes] Release Notes](https://github.com/easylogging/easyloggingpp/tree/master/doc/RELEASE-NOTES-v9.89)

[![samples] Samples](https://github.com/easylogging/easyloggingpp/tree/v9.88/samples)
[![samples] Samples](https://github.com/easylogging/easyloggingpp/tree/v9.89/samples)

[![paypal]](http://muflihun.com/support/)

Expand All @@ -27,6 +27,7 @@
<a href="#getting-started">Getting Started</a>
<a href="#download">Download</a>
<a href="#quick-start">Quick Start</a>
<a href="#install-optional">Install (Optional)</a>
<a href="#setting-application-arguments">Setting Application Arguments</a>
<a href="#configuration">Configuration</a>
<a href="#level">Level</a>
Expand Down Expand Up @@ -79,21 +80,21 @@
<a href="#logging-third-party-class">Logging Third-party Class</a>
<a href="#manually-flushing-and-rolling-log-files">Manually Flushing and Rolling Log Files</a>
<a href="#log-dispatch-callback">Log Dispatch Callback</a>
<a href="#logger-registration-callback">Logger Registration Callback</a>
<a href="#asynchronous-logging">Asynchronous Logging</a>
<a href="#helper-classes">Helper Classes</a>
<a href="#contribution">Contribution</a>
<a href="#submitting-patches">Submitting Patches</a>
<a href="#reporting-a-bug">Reporting a Bug</a>
<a href="#donation">Donation</a>
<a href="#compatibility">Compatibility</a>
<a href="#contributors">Contributors</a>
<a href="#licence">Licence</a>
<a href="#disclaimer">Disclaimer</a>
</pre>

# Introduction
Easylogging++ is single header only, feature-rich, efficient logging library for C++ applications. It has been written keeping three things in mind; performance, management (setup, configure, logging, simplicity) and portability. Its highly configurable and extremely useful for small to large sized projects.
This manual is for Easylogging++ v9.88. For other versions please refer to corresponding [release](https://github.com/easylogging/easyloggingpp/releases) on github.
This manual is for Easylogging++ v9.89. For other versions please refer to corresponding [release](https://github.com/easylogging/easyloggingpp/releases) on github.

[![top] Goto Top](#table-of-contents)

Expand Down Expand Up @@ -150,6 +151,16 @@ int main(int argc, char* argv[]) {
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 ../
make
make install
```
[![top] Goto Top](#table-of-contents)
### Setting Application Arguments
Expand Down Expand Up @@ -1211,6 +1222,13 @@ If you wish to capture log message right after it is dispatched, you can do so b
> 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/easylogging/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`
Expand Down Expand Up @@ -1303,28 +1321,6 @@ Easylogging++ has also been tested with following C++ libraries;
[![top] Goto Top](#table-of-contents)
# Contributors
Many people have contributed in this project but not all of them are visible in github. This is because we sometimes have to close pull-requests without merging them and copy their changes manually to prevent conflicts with rebased version. We may have missed some contributors but here is the list **in no specific order**.
* @mkhan3189
* @olehgol260
* @martin-mann
* @jas99
* @allender
* @LMDavid
* @sibbi77
* @a-teammate
* @neomantra
* @fengya90
* @rggjan
* @Oipo
* @neuront
* @LMolr
* @moneromooo-monero
* ...
Note: If we have missed you please notify us with link to your contribution (e.g, PR). You can see more contributors by checking our [closed](https://github.com/easylogging/easyloggingpp/issues?q=is%3Apr+is%3Aclosed) or [opened](https://github.com/easylogging/easyloggingpp/pulls?q=is%3Aopen+is%3Apr) pull requests.
# Licence
```
The MIT License (MIT)
Expand Down
22 changes: 0 additions & 22 deletions cmake/FindEasyloggingpp.cmake
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
#==============================================================================
# Copyright (c) 2015 Frozen Team.
#
# 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.
#==============================================================================
#
# Locate easylogging++ library
#
Expand All @@ -30,7 +9,6 @@
# $EASYLOGGINGPP_ROOT is an environment variable that
# would correspond to the installation path.
#
# TODO: Test it under OSX, Linux

set(EASYLOGGINGPP_PATHS ${EASYLOGGINGPP_ROOT} $ENV{EASYLOGGINGPP_ROOT})

Expand Down
20 changes: 20 additions & 0 deletions doc/RELEASE-NOTES-v9.89
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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
38 changes: 38 additions & 0 deletions samples/STL/new-logger-registration-callback.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// This file is part of Easylogging++ samples
// LoggerRegistrationCallback sample
//
// Revision 1.0
// @author mkhan3189
//

#include "easylogging++.h"

INITIALIZE_EASYLOGGINGPP
class Handler : public el::LoggerRegistrationCallback {
protected:
void handle(const el::Logger* logger) {
// Never log anything here
ELPP_COUT << "(Handler) Registered new logger " << logger->id() << std::endl;
}
};

class Handler2 : public el::LoggerRegistrationCallback {
protected:
void handle(const el::Logger* logger) {
ELPP_COUT << "(Handler2) Registered new logger " << logger->id() << std::endl;
}
};

int main(void) {

el::Loggers::installLoggerRegistrationCallback<Handler>("handler");
el::Loggers::installLoggerRegistrationCallback<Handler2>("handler2");

LOG(INFO) << "Now we will register three loggers";

el::Loggers::getLogger("logger1");
el::Loggers::getLogger("logger2");
el::Loggers::getLogger("logger3");
return 0;
}
1 change: 0 additions & 1 deletion samples/STL/post-performance-tracking-handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// @author mkhan3189
//

#define ELPP_HANDLE_POST_PERFORMANCE_TRACKING // we need this!
#include "easylogging++.h"

INITIALIZE_EASYLOGGINGPP
Expand Down
Loading

0 comments on commit fd4a183

Please sign in to comment.