File: testPriority.cpp

package info (click to toggle)
log4cpp 1.1.1-3~bpo8%2B2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 3,960 kB
  • sloc: sh: 9,583; cpp: 6,094; ansic: 1,049; makefile: 273
file content (17 lines) | stat: -rw-r--r-- 608 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>
#include "log4cpp/Priority.hh"

using namespace log4cpp;

int main(int argc, char** argv) {
    
    std::cout << "priority debug(700): " << Priority::getPriorityName(700) << std::endl;
    std::cout << "priority debug(700): " << Priority::getPriorityValue("DEBUG") << std::endl;
    std::cout << "priority debug(700): " << Priority::getPriorityValue("700") << std::endl;
    try {
	std::cout << "priority debug(700): " << Priority::getPriorityValue("700arghh") << std::endl;
    } catch(std::invalid_argument& e) {
	std::cout << "caught " << e.what() << std::endl;
    }
    return 0;
}