MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / xlog_set_domain

Function xlog_set_domain

common/log/xlog.c:495–506  ·  view source on GitHub ↗

* set the main prefix string, return 0 if success. */

Source from the content-addressed store, hash-verified

493 * set the main prefix string, return 0 if success.
494 */
495XLOG_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

Callers 1

xlog_create_writerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected