00001 #include <iostream>
00002 #include "log4cpp/Priority.hh"
00003
00004 using namespace log4cpp;
00005
00006 int main(int argc, char** argv) {
00007
00008 std::cout << "priority debug(700): " << Priority::getPriorityName(700) << std::endl;
00009 std::cout << "priority debug(700): " << Priority::getPriorityValue("DEBUG") << std::endl;
00010 std::cout << "priority debug(700): " << Priority::getPriorityValue("700") << std::endl;
00011 try {
00012 std::cout << "priority debug(700): " << Priority::getPriorityValue("700arghh") << std::endl;
00013 } catch(std::invalid_argument& e) {
00014 std::cout << "caught " << e.what() << std::endl;
00015 }
00016 return 0;
00017 }