OSDN Git Service

util/log: Support per-thread log files
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 17 Apr 2022 18:30:19 +0000 (11:30 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 20 Apr 2022 17:51:11 +0000 (10:51 -0700)
commit4e51069d679348d2617512e56e28cdc7bb34c833
tree3e785e72429be78d4d28060e9a3bcdaed66a4b51
parent30f5a73ac3be6a7ade2fc049162dc85c1bed9a9a
util/log: Support per-thread log files

Add a new log flag, tid, to turn this feature on.
Require the log filename to be set, and to contain %d.

Do not allow tid to be turned off once it is on, nor let
the filename be change thereafter.  This avoids the need
for signalling each thread to re-open on a name change.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-40-richard.henderson@linaro.org>
include/qemu/log.h
util/log.c