Example #1
0
int main()
{
    logpool_global_init(LOGPOOL_DEFAULT);
    {
        logpool_t *logpool = logpool_open(NULL, &LOGAPI, LOGAPI_PARAM);
        logpool_test_write(logpool);
        logpool_close(logpool);
    }
    return 0;
}
Example #2
0
int main(int argc, char const* argv[])
{
    logpool_global_init(LOGAPI_INIT_FLAG);
    logpool_t *logpool = logpool_open(NULL, &LOGAPI, LOGAPI_PARAM);
    int i, size = LOGPOOL_TEST_COUNT(argc, argv);
    for (i = 0; i < size; ++i) {
        logpool_test_write(logpool);
        if (i % 2) {
            usleep(1);
        }
    }
    logpool_close(logpool);
    logpool_global_exit();
    return 0;
}