Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logsink: fix multiple issues with LogSink::ToString() #852

Merged
merged 1 commit into from
Aug 13, 2022

Commits on Aug 13, 2022

  1. logsink: fix multiple issues with LogSink::ToString()

    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).
    anpol committed Aug 13, 2022
    Configuration menu
    Copy the full SHA
    a1608cc View commit details
    Browse the repository at this point in the history