* create a new writer */
| 467 | * create a new writer |
| 468 | */ |
| 469 | XLOG_API xlog_writer* xlog_create_writer(xlog_context* ctx, const char *domain) |
| 470 | { |
| 471 | xlog_writer *wr = NULL; |
| 472 | |
| 473 | if (ctx != NULL){ |
| 474 | wr = (xlog_writer*)malloc(sizeof(xlog_writer)); |
| 475 | wr->_ctx = ctx; |
| 476 | xlog_set_domain(wr, domain); |
| 477 | return wr; |
| 478 | } |
| 479 | return NULL; |
| 480 | } |
| 481 | |
| 482 | /** |
| 483 | * free a log writer |
no test coverage detected