Created
December 20, 2013 23:55
-
-
Save orian/8063546 to your computer and use it in GitHub Desktop.
Boost.Log simplest code + command line to compile it. Boost v1.54 Ubuntu 13.10,
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
#include <boost/log/trivial.hpp> | |
int main(int, char*[]) | |
{ | |
BOOST_LOG_TRIVIAL(trace) << "A trace severity message"; | |
BOOST_LOG_TRIVIAL(debug) << "A debug severity message"; | |
BOOST_LOG_TRIVIAL(info) << "An informational severity message"; | |
BOOST_LOG_TRIVIAL(warning) << "A warning severity message"; | |
BOOST_LOG_TRIVIAL(error) << "An error severity message"; | |
BOOST_LOG_TRIVIAL(fatal) << "A fatal severity message"; | |
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
#!/bin/bash | |
# | |
# On Ubuntu install lib Boost by: | |
# sudo apt-get install libboost1.54-dev-all | |
g++ \ | |
-DBOOST_LOG_DYN_LINK \ | |
-std=c++11 \ | |
-Wall \ | |
boost_log_test.cc \ | |
-lboost_log_setup \ | |
-lboost_log \ | |
-pthread \ | |
-o boost_log_test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment