2 * Copyright (C) 2023 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #include <common/logging-utils.hpp>
10 #include <sys/utsname.h>
12 /* Output system information as logging statements. */
13 void lttng::logging::log_system_information(lttng_error_level error_level
)
15 struct utsname name
= {};
16 const int ret
= uname(&name
);
19 PERROR("Failed to get system information using uname()")
23 LOG(error_level
, "System information:");
24 LOG(error_level
, "\tsysname: `%s`", name
.sysname
);
25 LOG(error_level
, "\tnodename: `%s`", name
.nodename
);
26 LOG(error_level
, "\trelease: `%s`", name
.release
);
27 LOG(error_level
, "\tversion: `%s`", name
.version
);
28 LOG(error_level
, "\tmachine: `%s`", name
.machine
);