Exemplo 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);
}
Exemplo n.º 2
0
void WeaselIME::_SetCompositionWindow(LPINPUTCONTEXT lpIMC)
{
	EZDBGONLYLOGGERVAR(lpIMC->cfCompForm.dwStyle);
	POINT pt = {-1, -1};
	switch (lpIMC->cfCompForm.dwStyle)
	{
	case CFS_DEFAULT:
		// require caret pos detection
		break;
	case CFS_RECT:
		//pt.x = lpIMC->cfCompForm.rcArea.left;
		//pt.y = lpIMC->cfCompForm.rcArea.top;
		break;
	case CFS_POINT:
		if (lpIMC->cfCompForm.rcArea.left == 0 && lpIMC->cfCompForm.rcArea.top == 0)
		{
			return;  // may be invalid position
		}
		pt = lpIMC->cfCompForm.ptCurrentPos;
		break;
	case CFS_FORCE_POSITION:
		pt = lpIMC->cfCompForm.ptCurrentPos;
		break;
	case CFS_CANDIDATEPOS:
		pt = lpIMC->cfCandForm[0].ptCurrentPos;
		break;
	default:
		// require caret pos detection
		break;
	}
	_UpdateInputPosition(lpIMC, pt);
}