From 66c9172424925b6fd11be5eca6828cbc08f1641a Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Tue, 1 Mar 2022 08:36:06 +0000 Subject: [PATCH] Feature: Report hostname, location, and admin from config to log --- src/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 356af196..be2cbf37 100644 --- a/src/main.c +++ b/src/main.c @@ -561,13 +561,15 @@ static inline void __log_system_name(void) { ICECAST_LOG_INFO("Running on %s; OS: %s; Address Bits: %i", hostname, system, sizeof(void*)*8); + config = config_get_config(); if (have_hostname) { - config = config_get_config(); if ((config->config_problems & CONFIG_PROBLEM_HOSTNAME) && util_hostcheck(hostname) == HOSTCHECK_SANE) { ICECAST_LOG_WARN("Hostname is not set to anything useful in , Consider setting it to the system's name \"%s\".", hostname); } - config_release_config(); } + + ICECAST_LOG_WARN("From configuration: Our hostname is %#H, located % #H, with admin contact % #H", config->hostname, config->location, config->admin); + config_release_config(); } #ifdef WIN32_SERVICE