Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
tests
testPriority.cpp
Go to the documentation of this file.
1
#include <iostream>
2
#include "
log4cpp/Priority.hh
"
3
4
using namespace
log4cpp
;
5
6
int
main
(
int
argc,
char
** argv) {
7
8
std::cout <<
"priority debug(700): "
<<
Priority::getPriorityName
(700) << std::endl;
9
std::cout <<
"priority debug(700): "
<<
Priority::getPriorityValue
(
"DEBUG"
) << std::endl;
10
std::cout <<
"priority debug(700): "
<<
Priority::getPriorityValue
(
"700"
) << std::endl;
11
try
{
12
std::cout <<
"priority debug(700): "
<<
Priority::getPriorityValue
(
"700arghh"
) << std::endl;
13
}
catch
(std::invalid_argument& e) {
14
std::cout <<
"caught "
<< e.what() << std::endl;
15
}
16
return
0;
17
}
main
int main(int argc, char **argv)
Definition:
testPriority.cpp:6
log4cpp
Definition:
AbortAppender.hh:16
log4cpp::Priority::getPriorityName
static const std::string & getPriorityName(int priority)
Definition:
Priority.cpp:37
log4cpp::Priority::getPriorityValue
static Value getPriorityValue(const std::string &priorityName)
Definition:
Priority.cpp:44
Priority.hh
log4cpp
Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung
autogenerated on Sun Jun 23 2019 19:10:00