Esempio n. 1
0
int main(int argc, char**argv)
{
    axter::ezlogger<>::set_verbosity_level_tolerance(axter::log_very_rarely);
    EZLOGGERFUNCTRACKER;
    int ReturnValue = 99;
    EZLOGGER_PRG_MAIN_ARG(argc, argv);
    EZDBGONLYLOGGER_PRG_MAIN_ARG(argc, argv);
    EZLOGGERVL_PRG_MAIN_ARG(axter::log_often, argc, argv);
    int i = 123;
    std::string somedata = "Hello World";
    EZLOGGER(i);
    EZDBGONLYLOGGER(i);
    EZLOGGERVL(axter::log_often)(i);

    EZLOGGERVAR(somedata);
    EZDBGONLYLOGGERVAR(somedata);
    EZLOGGERVLVAR(axter::log_often, somedata);

    bool SomeConditionVar = true;
    EZLOGGERVAR(SomeConditionVar == false);
    EZDBGONLYLOGGERVAR(SomeConditionVar == false);
    EZLOGGERVLVAR(axter::log_often, SomeConditionVar == true);

    EZLOGGERVLVARIFY(axter::log_often, SomeConditionVar == false);

    EZLOGGERSTREAM << somedata << " " << i << std::endl;
    EZLOGGERSTREAM << somedata << " next line " << i << std::endl;
    EZLOGGERSTREAM2(std::cerr) << somedata << " next line " << i << std::endl;
    EZDBGONLYLOGGERSTREAM << somedata << " " << i << std::endl;
    EZDBGONLYLOGGERSTREAM << somedata << " next line " << i << std::endl;
    EZLOGGERVLSTREAM(axter::log_often) << somedata << " " << i << std::endl;
    // EZLOGGERVLSTREAM(axter::levels(axter::log_often, axter::warn, __FUNCSIG__ /*or GNU PRETTY_FUNCTION*/,"Xyz Facility")) << somedata << " " << i << std::endl;

    EZLOGGERPRINT("i = %i and somedata = %s", i, somedata.c_str());
    EZDBGONLYLOGGERPRINT("i = %i and somedata = %s", i, somedata.c_str());
    EZLOGGERVLPRINT(axter::log_often)("i = %i and somedata = %s", i, somedata.c_str());
    //Alternative method
    EZLOGGERVL(axter::log_often).cprint("i = %i and somedata = %s", i, somedata.c_str());
    EZLOGGER.cprint("i = %i and somedata = %s", i, somedata.c_str());

    if (1)
    {
        EZLOGGERMARKER;
        EZDBGONLYLOGGERMARKER;
        EZLOGGERVLMARKER(axter::log_often);
    }

    some_func1();

    return EZLOGGERVAR(ReturnValue);
}
void* some_func0(ASE::PAC::Allocator& a) {
	return some_func1(a);
}