logging: if folly::format() fails, also log the arguments
authorAdam Simpkins <simpkins@fb.com>
Tue, 13 Jun 2017 01:33:06 +0000 (18:33 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 13 Jun 2017 01:38:15 +0000 (18:38 -0700)
Summary:
If the folly::sformat() call fails in an FB_LOGF() statement, make a
best-effort attempt to log the format arguments as well, in addition to the
format string.  For each argument, folly::to<std::string>() is use if it is
supported for this argument.

This will help ensure that the arguments that were being logged aren't lost
even if the format string was incorrect.

Reviewed By: WillerZ

Differential Revision: D5082978

fbshipit-source-id: 0d56030e639cd7e8f2242bb43646ab4248c6a877


No differences found