MCPcopy Create free account
hub / github.com/corosync/corosync / logsys_file_format_get

Function logsys_file_format_get

exec/logsys.c:547–569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545}
546
547static void
548logsys_file_format_get(char* file_format, int buf_len)
549{
550 char *format_buffer_start;
551 char *str_pos;
552
553 file_format[0] = '\0';
554
555 format_buffer_start = format_buffer;
556
557 if ((str_pos = strstr(format_buffer, "%t"))) {
558 strcpy(file_format, "%t ");
559 format_buffer_start = str_pos + 2;
560 }
561
562 if ((str_pos = strstr(format_buffer, "%T"))) {
563 strcpy(file_format, "%T ");
564 format_buffer_start = str_pos + 2;
565 }
566
567 strcat(file_format, "[%P] %H %N");
568 strncat(file_format, format_buffer_start, buf_len - strlen(file_format));
569}
570
571int logsys_format_set (const char *format)
572{

Callers 2

logsys_format_setFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected