Created
December 14, 2014 23:52
-
-
Save akira-okumura/45f92c0e06dfafeb370a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$ g++ -c Logger.cc -o Logger.o -Wall -Wextra -O2 -DBOOST_LOG_DYN_LINK | |
$ g++ -c main.cc -o main.o -Wall -Wextra -O2 -DBOOST_LOG_DYN_LINK | |
$ g++ Logger.o main.o -o logger -L/opt/local/lib -lboost_log-mt -lboost_thread-mt -lboost_system-mt | |
$ ./logger | |
3 2014/12/14 23:51:46.462308 (UTC) [WARNING] This is a WARNING output | |
4 2014/12/14 23:51:46.462322 (UTC) [ERROR] This is an ERROR output | |
5 2014/12/14 23:51:46.462336 (UTC) [FATAL] This is a FATAL output | |
$ cat debug.log | |
1 2014/12/14 23:51:46.462186 (UTC) [DEBUG] This is a DEBUG output | |
2 2014/12/14 23:51:46.462300 (UTC) [INFO] This is a INFO output | |
3 2014/12/14 23:51:46.462308 (UTC) [WARNING] This is a WARNING output | |
4 2014/12/14 23:51:46.462322 (UTC) [ERROR] This is an ERROR output | |
5 2014/12/14 23:51:46.462336 (UTC) [FATAL] This is a FATAL output | |
6 2014/12/14 23:51:46.462344 (UTC) [WARNING] This is the 2nd WARNING output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment