-
-
Notifications
You must be signed in to change notification settings - Fork 927
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #436 from easylogging/develop
v9.87 release
- Loading branch information
Showing
6 changed files
with
79 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters