Closed yaoxin1995 closed 1 year ago
This is not possible with simplelog out of the box.
You could implement your own SharedLogger
, that just wraps a WriteLogger
inside an Arc<Mutex<_>>
. Then you could exchange the logger in there at runtime to switch logging to a different file.
many thanks, problem resolved
After the global logger is set to
WriteLogger
with file path/a/b
.Is it possible to update the file path and let the logger log message to another file
/a/c
?