Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
common: use fmt::format for stderr logging
Reduce the number of syscalls to improve performance. Also reduce the probability of https://tracker.ceph.com/issues/49551, since conmon is less likely to read partial log line. Test shows that `fmt::print(cerr, ...)` is as performant as calling `writev` directly. And it is portable and safe in handling short write. fmt::print(stderr, ...) is not used because it can throw exception. Fixes: https://tracker.ceph.com/issues/53682 Signed-off-by: 胡玮文 <huww98@outlook.com>
- Loading branch information