Commit 523ba5a7 authored by Florian Müllner's avatar Florian Müllner

shell: Remove shell_global_structured_log()

It is now unused.

parent 07d25cd6
Pipeline #88490 passed with stages
in 4 minutes and 5 seconds
......@@ -29,12 +29,6 @@
#include <meta/meta-workspace-manager.h>
#include <meta/meta-x11-display.h>
#include <systemd/sd-journal.h>
#include <errno.h>
#include <unistd.h>
/* Memory report bits */
#include <malloc.h>
......@@ -1171,52 +1165,6 @@ shell_global_reexec_self (ShellGlobal *global)
* shell_global_log_structured:
* @message: A message to print
* @keys: (allow-none) (array zero-terminated=1) (element-type utf8): Optional structured data
* Log structured data in an operating-system specific fashion. The
* parameter @opts should be an array of UTF-8 KEY=VALUE strings.
* This function does not support binary data. See
* or more information about fields that can be used on a systemd
* system.
shell_global_log_structured (const char *message,
const char *const *keys)
const char *const*iter;
char *msgkey;
guint i, n_opts;
struct iovec *iovs;
for (n_opts = 0, iter = keys; *iter; iter++, n_opts++)
n_opts++; /* Add one for MESSAGE= */
iovs = g_alloca (sizeof (struct iovec) * n_opts);
for (i = 0, iter = keys; *iter; iter++, i++) {
iovs[i].iov_base = (char*)keys[i];
iovs[i].iov_len = strlen (keys[i]);
g_assert(i == n_opts-1);
msgkey = g_strconcat ("MESSAGE=", message, NULL);
iovs[i].iov_base = msgkey;
iovs[i].iov_len = strlen (msgkey);
// The code location isn't useful since we're wrapping
sd_journal_sendv (iovs, n_opts);
g_free (msgkey);
g_print ("%s\n", message);
* shell_global_notify_error:
* @global: a #ShellGlobal
......@@ -79,9 +79,6 @@ void shell_global_init_xdnd (ShellGlobal *global);
void shell_global_reexec_self (ShellGlobal *global);
void shell_global_log_structured (const char *message,
const char *const *keys);
const char * shell_global_get_session_mode (ShellGlobal *global);
void shell_global_set_runtime_state (ShellGlobal *global,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment