1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
15 #include <anna/core/functions.hpp>
16 #include <anna/core/core.hpp>
17 #include <anna/core/RuntimeException.hpp>
18 #include <anna/core/tracing/TraceLevelChecker.hpp>
19 #include <anna/core/tracing/Configuration.hpp>
24 using namespace anna::tracing;
26 void _exit(const std::string & msg) {
27 std::cout << std::endl << msg << std::endl;
31 void test(const std::string & value) throw() {
33 std::string msg = "Starting test for ";
35 Logger::information(msg , ANNA_FILE_LOCATION);
37 anna::tracing::TraceLevelChecker tlc(value.c_str());
38 LOGDEBUG(Logger::debug("Enabled tracing ?", ANNA_FILE_LOCATION));
40 std::string msg = "Finishing test for ";
42 Logger::information(msg , ANNA_FILE_LOCATION);
46 int main(int argc, char** argv) {
47 Logger::setLevel(Logger::Information);
48 // Logger::setLevel(Logger::Debug);
49 Logger::initialize("selectiveTracing", new TraceWriter("file.trace", 2048000));
50 anna::tracing::Configuration & conf = anna::tracing::Configuration::instantiate();
51 LOGINFORMATION(Logger::information("Blue Trigger", ANNA_FILE_LOCATION));
52 conf.activateTraceTrigger("blue");
56 conf.useRegexpForTraceTriggers();