src_tests_log_file_SOURCES = src/tests/log_file.c src/shared/log_file.c
src_tests_log_file_CFLAGS = $(check_CFLAGS)
-src_tests_log_file_LDFLAGS = $(AM_LDFLAGS) -Wl,--wrap=strdup,--wrap=free,--wrap=memcpy,--wrap=snprintf,--wrap=open,--wrap=fstat,--wrap=rename,--wrap=dlogutil_entry_ts,--wrap=log_print_log_line,--wrap=log_buffer_get_tag
+src_tests_log_file_LDFLAGS = $(AM_LDFLAGS) -Wl,--wrap=strdup,--wrap=free,--wrap=memcpy,--wrap=snprintf,--wrap=open,--wrap=fstat,--wrap=rename,--wrap=dlogutil_entry_ts,--wrap=log_print_log_line,--wrap=dlogutil_entry_tag
src_tests_queued_entry_SOURCES = src/tests/queued_entry.c src/shared/queued_entry.c src/shared/queued_entry_timestamp.c src/shared/parsers.c src/shared/translate_syslog.c src/shared/logconfig.c src/shared/logcommon.c
src_tests_queued_entry_CFLAGS = $(check_CFLAGS)
*
* Finds the beginning of a log tag in entry's payload and returns it
*/
-const char* log_buffer_get_tag(const struct dlogutil_entry *entry);
+const char* dlogutil_entry_tag(const struct dlogutil_entry *entry);
/**
* Returns pointer to log entry message
if (ts.tv_sec < file->prev_sec || (ts.tv_sec == file->prev_sec && ts.tv_nsec < file->prev_nsec)) {
struct dlogutil_entry_with_msg msg;
memcpy(&msg, e, sizeof *e);
- int r = snprintf(msg.msg, sizeof msg.msg, "%s%c%s", log_buffer_get_tag(e), '\0', "INFO: Following log entry could not be sorted and is out of order.");
+ int r = snprintf(msg.msg, sizeof msg.msg, "%s%c%s", dlogutil_entry_tag(e), '\0', "INFO: Following log entry could not be sorted and is out of order.");
if (r < 0) {
ERR("unable to format out-of-order message %m");
const char *tag;
log_priority prio;
- tag = log_buffer_get_tag(entry);
+ tag = dlogutil_entry_tag(entry);
/* mark empty-tagged messages and make it easy to catch an application that does that */
if (!tag || !strlen(tag))
tag = "DLOG_ERROR_NOTAG";
* @param[in] entry The log entry
* @return Pointer to log tag
*/
-const char* log_buffer_get_tag(const struct dlogutil_entry *entry)
+const char* dlogutil_entry_tag(const struct dlogutil_entry *entry)
{
assert(entry);
priChar = filter_pri_to_char((log_priority)entry->priority);
- tag = log_buffer_get_tag(entry);
+ tag = dlogutil_entry_tag(entry);
/* mark empty-tagged messages and make it easy to catch an application that does that */
if (!tag || !strlen(tag))
tag = "DLOG_ERROR_NOTAG";
assert(expected->header.pid == lem.header.pid);
assert(expected->header.tid == lem.header.tid);
- const char *const tag_expected = log_buffer_get_tag(&expected->header);
- const char *const tag_actual = log_buffer_get_tag(&lem.header);
+ const char *const tag_expected = dlogutil_entry_tag(&expected->header);
+ const char *const tag_actual = dlogutil_entry_tag(&lem.header);
const char *const msg_expected = log_buffer_get_message(&expected->header);
const char *const msg_actual = log_buffer_get_message(&lem.header);
assert(tag_expected);
};
}
-char *__wrap_log_buffer_get_tag(const struct dlogutil_entry *entry)
+char *__wrap_dlogutil_entry_tag(const struct dlogutil_entry *entry)
{
assert(entry == (struct dlogutil_entry *) 0xBA5EBALL);
return "";
{
const struct dlogutil_entry entry = { .len = 1 };
assert(!log_buffer_get_message(&entry));
- assert(!log_buffer_get_tag(&entry));
+ assert(!dlogutil_entry_tag(&entry));
struct dlogutil_filter_options *const filter = log_filter_new();
assert(filter);
assert(sle->pid == 678);
assert(sle->priority == DLOG_FATAL);
- assert(!strcmp("SYSLOG_USER", log_buffer_get_tag(sle)));
+ assert(!strcmp("SYSLOG_USER", dlogutil_entry_tag(sle)));
assert(!strcmp("msg", log_buffer_get_message(sle)));
// Valid
assert(sle->pid == 0);
assert(sle->priority == DLOG_FATAL);
- assert(!strcmp("SYSLOG_USER", log_buffer_get_tag(sle)));
+ assert(!strcmp("SYSLOG_USER", dlogutil_entry_tag(sle)));
assert(!strcmp("msg", log_buffer_get_message(sle)));
return 0;