Instead of having an exception propagate into the program (which at worst causes a crash) when an error happens while formatting a log message, just print a message to the log. This message clearly indicates what log message was formatted wrongly, and what error happened during formatting it.
Addresses .
Before
2017-03-09 10:58:20
************************
EXCEPTION: St13runtime_error
tinyformat: Too many conversion specifiers in format string
bitcoin in AppInit()
************************
EXCEPTION: St13runtime_error
tinyformat: Too many conversion specifiers in format string
bitcoin in AppInit()
2017-03-09 10:58:20 Shutdown: In progress...
2017-03-09 10:58:20 scheduler thread interrupt
2017-03-09 10:58:20 Shutdown: done
(and process exits)
After
2017-03-09 10:51:50 Error "tinyformat: Too many conversion specifiers in format string" while formatting log message: Erasing %s %s
(and process continues)
Published at Fri, 10 Mar 2017 17:52:52 +0000
[wpr5_ebay kw=”bitcoin” num=”1″ ebcat=”” cid=”5338043562″ lang=”en-US” country=”0″ sort=”bestmatch”]{flickr|100|campaign}