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 =
"./log4cpp.init";
54 initFileName = std::string(srcdir) +
"/log4cpp.init";
58 std::cout <<
"Configure Problem " << f.what() << std::endl;
70 root.
error(
"root error");
71 root.
warn(
"root warn");
72 sub1.
error(
"sub1 error");
73 sub1.
warn(
"sub1 warn");
77 sub2.
error(
"sub2 error");
78 sub2.
warn(
"sub2 warn");
80 root.
error(
"root error");
81 root.
warn(
"root warn");
82 sub1.
error(
"sub1 error");
83 sub1.
warn(
"sub1 warn");
91 sub2.
error(
"sub2 error");
92 sub2.
warn(
"sub2 warn");
93 sub2.
error(
"%s %s %d",
"test",
"vform", 123);
static void configure(const std::string &initFileName)
CategoryStream warnStream()
void warn(const char *stringFormat,...)
LOG4CPP_EXPORT CategoryStream & eol(CategoryStream &os)
static Category & getInstance(const std::string &name)
static Category & getRoot()
int main(int argc, char *argv[])
void error(const char *stringFormat,...)