Cleanup #53682
common: use fmt::print for stderr logging
Description
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 is as performant as calling `writev` directly. And it is portable and safe in handling short write.
Related issues
History
#1 Updated by Patrick Donnelly over 1 year ago
- Related to Bug #57923: log: writes to stderr (pipe) may not be atomic added
#2 Updated by Patrick Donnelly over 1 year ago
- Status changed from New to Pending Backport
- Target version set to v18.0.0
- Backport changed from pacific, octopus to quincy,pacific
#3 Updated by Backport Bot over 1 year ago
- Copied to Backport #57925: pacific: common: use fmt::print for stderr logging added
#4 Updated by Backport Bot over 1 year ago
- Copied to Backport #57926: quincy: common: use fmt::print for stderr logging added
#5 Updated by Backport Bot over 1 year ago
- Tags set to backport_processed
#6 Updated by Konstantin Shalygin 6 months ago
- Assignee set to 玮文 胡