* set the main prefix string, return 0 if success. */
| 493 | * set the main prefix string, return 0 if success. |
| 494 | */ |
| 495 | XLOG_API int xlog_set_domain(xlog_writer* wr, const char *domain) |
| 496 | { |
| 497 | if (wr == NULL){ |
| 498 | return -1; |
| 499 | } |
| 500 | wr->_domain[0] = '\0'; |
| 501 | |
| 502 | if (domain && *domain){ |
| 503 | strncpy(wr->_domain, domain, sizeof(wr->_domain) - 1); |
| 504 | } |
| 505 | return 0; |
| 506 | } |
| 507 | |
| 508 | //-------------------------------------------------print api |
| 509 |
no outgoing calls
no test coverage detected