-
-
Notifications
You must be signed in to change notification settings - Fork 929
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 #614 from muflihun/develop
9.96.1
- Loading branch information
Showing
7 changed files
with
79 additions
and
11 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
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,39 @@ | ||
// | ||
// This file is part of Easylogging++ samples | ||
// | ||
// Revision 1.0 | ||
// | ||
|
||
#include <thread> | ||
#include "easylogging++.h" | ||
|
||
INITIALIZE_EASYLOGGINGPP | ||
|
||
void def() { | ||
for (int i = 0; i < 10000; ++i) | ||
CLOG(INFO, "first") << "This is from first " << i; | ||
} | ||
|
||
void second() { | ||
for (int i = 0; i < 10000; ++i) | ||
CLOG(INFO, "second") << "This is from second" << i; | ||
} | ||
|
||
int main(int,char**){ | ||
el::Loggers::addFlag(el::LoggingFlag::CreateLoggerAutomatically); | ||
|
||
el::Configurations confFromFile("../default-logger.conf"); | ||
|
||
el::Loggers::setDefaultConfigurations(confFromFile, true); | ||
|
||
LOG(INFO)<<"The program has started!"; | ||
|
||
std::thread t1(def); | ||
std::thread t2(second); | ||
|
||
t1.join(); | ||
t2.join(); | ||
|
||
LOG(INFO) << "Shutting down."; | ||
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
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