-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
logsink: fix multiple issues with LogSink::ToString() (#852)
1. Initializing std::ostringstream with a string makes no sense, as the string becomes an initial value of an underlying buffer; seek-to-end is not performed, so the initial value gets completely overwritten by subsequent writing. 2. Flag `log_year_in_prefix` should be considered, as if formatting a regular logging message. 3. Writing a buffer to std::ostream is better expressed with write(s,n).
- Loading branch information
Showing
2 changed files
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters