Skip to content

Commit

Permalink
Merge pull request #436 from easylogging/develop
Browse files Browse the repository at this point in the history
v9.87 release
  • Loading branch information
easylogging authored Dec 28, 2016
2 parents 7d1ff1f + f78faef commit 6c76ca1
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 10 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
‫بسم الله الرَّحْمَنِ الرَّحِيمِ


> **Manual For v9.86**
> **Manual For v9.87**
>
> [![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.86)
[![notes] Release Notes](https://github.com/easylogging/easyloggingpp/tree/master/doc/RELEASE-NOTES-v9.87)

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

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

Expand Down Expand Up @@ -93,7 +93,7 @@

# 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.86. For other versions please refer to corresponding [release](https://github.com/easylogging/easyloggingpp/releases) on github.
This manual is for Easylogging++ v9.87. For other versions please refer to corresponding [release](https://github.com/easylogging/easyloggingpp/releases) on github.

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

Expand Down
20 changes: 20 additions & 0 deletions doc/RELEASE-NOTES-v9.87
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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
31 changes: 31 additions & 0 deletions samples/STL/different-output.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// different-output.cpp
// v1.0
//
// Multiple loggers to have different output for file and console
//

#include "easylogging++.h"

INITIALIZE_EASYLOGGINGPP

#define MY_CUSTOM_LOGGER(LEVEL) CLOG(LEVEL, "default", "fileLogger")

int main() {

el::Configurations fileConf("../file.conf");
el::Configurations consoleConf("../console.conf");


el::Loggers::addFlag(el::LoggingFlag::MultiLoggerSupport); // Enables support for multiple loggers
el::Logger* fileLogger = el::Loggers::getLogger("fileLogger"); // Register new logger

el::Loggers::reconfigureLogger("default", consoleConf);
el::Loggers::reconfigureLogger(fileLogger, fileConf);



MY_CUSTOM_LOGGER(INFO) << "This is how we do it.";

return 0;
}
9 changes: 9 additions & 0 deletions samples/console.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
* GLOBAL:
FORMAT = "%msg"
FILENAME = "/tmp/logs/file.log"
ENABLED = true
TO_FILE = false ## Notice this
TO_STANDARD_OUTPUT = true ## Notice this
MILLISECONDS_WIDTH = 3
PERFORMANCE_TRACKING = false
MAX_LOG_FILE_SIZE = 2097152 ## Throw log files away after 2MB
9 changes: 9 additions & 0 deletions samples/file.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
* GLOBAL:
FORMAT = "%level %datetime %msg"
FILENAME = "/tmp/logs/file.log"
ENABLED = true
TO_FILE = true ## Notice this
TO_STANDARD_OUTPUT = false ## Notice this
MILLISECONDS_WIDTH = 3
PERFORMANCE_TRACKING = false
MAX_LOG_FILE_SIZE = 2097152 ## Throw log files away after 2MB
12 changes: 6 additions & 6 deletions src/easylogging++.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Bismillah ar-Rahmaan ar-Raheem
//
// Easylogging++ v9.86
// Easylogging++ v9.87
// Single-header only, cross-platform logging library for C++ applications
//
// Copyright (c) 2017 muflihun.com
Expand Down Expand Up @@ -5378,13 +5378,13 @@ writer(level, __FILE__, __LINE__, ELPP_FUNC, dispatchAction).construct(el_getVAL
#define ELPP_WRITE_LOG_IF(writer, condition, level, dispatchAction, ...) if (condition) \
writer(level, __FILE__, __LINE__, ELPP_FUNC, dispatchAction).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__)
#define ELPP_WRITE_LOG_EVERY_N(writer, occasion, level, dispatchAction, ...) \
if (ELPP->validateEveryNCounter(__FILE__, __LINE__, occasion)) \
ELPP->validateEveryNCounter(__FILE__, __LINE__, occasion) && \
writer(level, __FILE__, __LINE__, ELPP_FUNC, dispatchAction).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__)
#define ELPP_WRITE_LOG_AFTER_N(writer, n, level, dispatchAction, ...) \
if (ELPP->validateAfterNCounter(__FILE__, __LINE__, n)) \
ELPP->validateAfterNCounter(__FILE__, __LINE__, n) && \
writer(level, __FILE__, __LINE__, ELPP_FUNC, dispatchAction).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__)
#define ELPP_WRITE_LOG_N_TIMES(writer, n, level, dispatchAction, ...) \
if (ELPP->validateNTimesCounter(__FILE__, __LINE__, n)) \
ELPP->validateNTimesCounter(__FILE__, __LINE__, n) && \
writer(level, __FILE__, __LINE__, ELPP_FUNC, dispatchAction).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__)
#undef ELPP_CURR_FILE_PERFORMANCE_LOGGER
#if defined(ELPP_PERFORMANCE_LOGGER)
Expand Down Expand Up @@ -6185,11 +6185,11 @@ class VersionInfo : base::StaticClass {
public:
/// @brief Current version number
static inline const std::string version(void) {
return std::string("9.86");
return std::string("9.87");
}
/// @brief Release date of current version
static inline const std::string releaseDate(void) {
return std::string("28-12-2016 1547hrs");
return std::string("28-12-2016 1819hrs");
}
};
} // namespace el
Expand Down

0 comments on commit 6c76ca1

Please sign in to comment.