os: add a generic -verbose option instead of making each server add its own

Replaces Xwayland's server-specific implementation, but leaves Xorg's
since it sets global variables in the xfree86 ddx layer.  Also leaves
Xephyr's differently-spelled "-verbosity" for backwards compatibility.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2131>
This commit is contained in:
Alan Coopersmith
2026-02-22 17:55:45 -08:00
committed by Enrico Weigelt, metux IT consult
parent 2fe0214c84
commit 4892a42d40
2 changed files with 5 additions and 3 deletions

View File

@@ -286,8 +286,10 @@ ddxProcessArgument(int argc, char **argv, int i)
* was added, so it's been left for compatibility */
else if (!strcmp(argv[i], "-verbosity")) {
if (i + 1 < argc && argv[i + 1][0] != '-') {
xorgLogVerbosity = atoi(argv[i + 1]);
EPHYR_LOG("set verbosity to %d\n", xorgLogVerbosity);
int verbosity = atoi(argv[i + 1]);
LogSetParameter(XLOG_VERBOSITY, verbosity);
EPHYR_LOG("set verbosity to %d\n", verbosity);
return 2;
}
else {

View File

@@ -675,7 +675,7 @@ ProcessCommandLine(int argc, char *argv[])
i = n;
}
}
xorgLogVerbosity = verbosity;
LogSetParameter(XLOG_VERBOSITY, verbosity);
}
else if (strcmp(argv[i], "-wr") == 0)
whiteRoot = TRUE;