From cc4e5d08d37a091711b5feb89c85721bb2e57fb4 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 10 Feb 2025 14:20:04 +0100 Subject: [PATCH] os: direct access to logFileVerbosity No need for complicated 'generic' setter, just make the variable itself available to DDX'es. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xfree86/common/xf86Init.c | 2 +- hw/xwin/InitOutput.c | 2 +- os/log.c | 2 +- os/log_priv.h | 8 ++++++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index ef62095e5..93808d01e 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -878,7 +878,7 @@ void xf86SetLogVerbosity(int verb) { xf86LogVerbose = verb; - LogSetParameter(XLOG_FILE_VERBOSITY, verb); + logFileVerbosity = verb; } static void diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index 16d505e38..d89f71a52 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -645,7 +645,7 @@ OsVendorInit(void) } logVerbosity = 2; - LogSetParameter(XLOG_FILE_VERBOSITY, logVerbosity); + logFileVerbosity = 2; /* Log the version information */ if (serverGeneration == 1) diff --git a/os/log.c b/os/log.c index 403894ff4..e36806825 100644 --- a/os/log.c +++ b/os/log.c @@ -111,9 +111,9 @@ OR PERFORMANCE OF THIS SOFTWARE. Bool logSync = FALSE; int logVerbosity = DEFAULT_LOG_VERBOSITY; +int logFileVerbosity = DEFAULT_LOG_FILE_VERBOSITY; static int logFileFd = -1; -static int logFileVerbosity = DEFAULT_LOG_FILE_VERBOSITY; /* Buffer to information logged before the log file is opened. */ static char *saveBuffer = NULL; diff --git a/os/log_priv.h b/os/log_priv.h index 3d5667f61..e1246814c 100644 --- a/os/log_priv.h +++ b/os/log_priv.h @@ -23,4 +23,12 @@ extern Bool logSync; */ extern int logVerbosity; +/** + * @brief log file verbosity + * + * The verbosity level of logging to per-display file. All messages with + * verbosity level below this one will be written to the log file. + */ +extern int logFileVerbosity; + #endif /* _XSERVER_LOG_PRIV_H */