Fix: syscall event rule: emission sites not compared in is_equal
[lttng-tools.git] / src / common / logging-utils.cpp
CommitLineData
e35e95ea
JG
1/*
2 * Copyright (C) 2023 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8#include <common/logging-utils.hpp>
9
10#include <sys/utsname.h>
11
12/* Output system information as logging statements. */
13void lttng::logging::log_system_information(lttng_error_level error_level)
14{
15 struct utsname name = {};
16 const int ret = uname(&name);
17
18 if (ret) {
19 PERROR("Failed to get system information using uname()")
20 return;
21 }
22
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);
29}
This page took 0.036254 seconds and 4 git commands to generate.