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

Empty strings are passed to report_event func #140

Open
KostikovIlya opened this issue Jan 27, 2021 · 0 comments
Open

Empty strings are passed to report_event func #140

KostikovIlya opened this issue Jan 27, 2021 · 0 comments

Comments

@KostikovIlya
Copy link

I've built an example of the event_log ("example/event_log").
But it doesn't work.
Instead of
The drive C: has low free disk space. At least 2097152 Mb of free space is recommended
I've got
The drive has low free disk space. At least Mb of free space is recommended..

There is an array of empty strings in the report_event call: WORD wNumStrings = 2; const char** lpStrings = { "", ""}.
Maybe, it is related to:

 void operator() (record_view const& rec, insertion_list& insertions) const
  {
      std::size_t size = m_Formatters.size();
      insertions.resize(size);
      for (std::size_t i = 0; i < size; ++i)
      {
          typename formatter_type::stream_type strm(insertions[i]);
          m_Formatters[i](rec, strm);
          strm.flush();
      }
  }

After calling strm.flush(); insertions[i] is empty,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant