annotate src/log4cxx-test.cpp @ 6161:8fcac4d6d983 release

of-queueing: Fix syntax error with Octave 7 (bug #62314). * src/of-queueing-1-octave7.patch: Add new file. * dist-files.mk: Include new patch.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 14 Apr 2022 19:27:13 +0200
parents a7a203db74c5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2466
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
1 /*
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
2 * This file is part of MXE.
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
3 * See index.html for further information.
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
4 */
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
5
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
6 #include <cstdlib>
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
7 #include "log4cxx/logger.h"
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
8 #include "log4cxx/basicconfigurator.h"
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
9 #include "log4cxx/helpers/exception.h"
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
10
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
11 using namespace log4cxx;
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
12 using namespace log4cxx::helpers;
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
13
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
14 LoggerPtr logger(Logger::getLogger("MXE"));
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
15
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
16 int main(int argc, char **argv)
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
17 {
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
18 (void)argc;
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
19 (void)argv;
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
20
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
21 int result = EXIT_SUCCESS;
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
22 try
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
23 {
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
24 BasicConfigurator::configure();
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
25 LOG4CXX_INFO(logger, "Hello World!");
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
26 }
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
27 catch(Exception&)
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
28 {
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
29 result = EXIT_FAILURE;
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
30 }
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
31
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
32 return result;
a7a203db74c5 packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
33 }