9 #ifdef LOG4CPP_HAVE_UNISTD_H 29 double denominator = 3.0;
32 for (i = 0; i < 50000000l; i++)
34 retVal = retVal - (4.0 / denominator);
36 retVal = retVal + (4.0 /denominator);
42 int main(
int argc,
char* argv[])
48 char* srcdir = getenv(
"srcdir");
49 std::string initFileName;
51 initFileName =
"./testConfig.log4cpp.properties";
54 initFileName = std::string(srcdir) +
"/testConfig.log4cpp.properties";
58 std::cout <<
"Configure Problem " << f.what() << std::endl;
73 root.
error(
"root error");
74 root.
warn(
"root warn");
75 sub1.
error(
"sub1 error");
76 sub1.
warn(
"sub1 warn");
80 sub2.
error(
"sub2 error");
81 sub2.
warn(
"sub2 warn");
83 root.
error(
"root error");
84 root.
warn(
"root warn");
85 sub1.
error(
"sub1 error");
86 sub1.
warn(
"sub1 warn");
94 sub2.
error(
"sub2 error");
95 sub2.
warn(
"sub2 warn");
96 sub2.
error(
"%s %s %d",
"test",
"vform", 123);
CategoryStream warnStream()
int main(int argc, char *argv[])
void warn(const char *stringFormat,...)
LOG4CPP_EXPORT CategoryStream & eol(CategoryStream &os)
static Category & getInstance(const std::string &name)
static Category & getRoot()
void error(const char *stringFormat,...)
static void configure(const std::string &initFileName)