Skip to content
Snippets Groups Projects
Commit 56ba98a8 authored by Ryan Gonzalez's avatar Ryan Gonzalez Committed by Simon McVittie
Browse files

log: Add support for level prefixes to _srt_journal_stream_fd


This will be needed later on for adding prefixes to output sent to the
journal.

steamrt/tasks#444

Signed-off-by: default avatarRyan Gonzalez <ryan.gonzalez@collabora.com>
parent e13318f8
No related branches found
No related tags found
No related merge requests found
......@@ -54,6 +54,7 @@ typedef enum
int _srt_journal_stream_fd (const char *identifier,
int priority,
gboolean enable_level_prefixes,
GError **error);
gboolean _srt_util_set_glib_log_handler (const char *prgname,
......
......@@ -111,6 +111,7 @@ no_sd_journal_stream_fd (const char *identifier,
int
_srt_journal_stream_fd (const char *identifier,
int priority,
gboolean enable_level_prefixes,
GError **error)
{
glnx_autofd int fd = -1;
......@@ -158,7 +159,7 @@ _srt_journal_stream_fd (const char *identifier,
g_once_init_leave (&our_sd_journal_stream_fd, sym);
}
fd = our_sd_journal_stream_fd (identifier, priority, FALSE);
fd = our_sd_journal_stream_fd (identifier, priority, enable_level_prefixes);
if (fd < 0)
{
......@@ -189,7 +190,7 @@ _srt_stdio_to_journal (const char *identifier,
g_return_val_if_fail (target_fd >= 0, -1);
fd = _srt_journal_stream_fd (identifier, priority, error);
fd = _srt_journal_stream_fd (identifier, priority, FALSE, error);
if (fd < 0)
return FALSE;
......
......@@ -284,6 +284,7 @@ _srt_logger_setup (SrtLogger *self,
g_debug ("opening new Journal stream: %s", self->identifier);
self->journal_fd = _srt_journal_stream_fd (self->identifier,
LOG_INFO,
FALSE,
&journal_error);
if (self->journal_fd < 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment