0

So long story short, application is crashing. I'm trying to use spdlog to inspect the situation but looks like application crashes before log file is saved, so there is no log.

Thinking about it I can imagine this actually is normal behavior of spdlog and perhaps same will happen with other loggers.

So how is this kind of situation supposed to be handled? Is there anything the logger can do in this scenario? Or should I, first of all, avoid the crash (before trying to use a logger)?

KcFnMi
  • 5,516
  • 10
  • 62
  • 136
  • What about the core dump? – Scheff's Cat Feb 11 '22 at 06:45
  • Sorry, what do you mean? – KcFnMi Feb 11 '22 at 07:04
  • If you want to find out where your program crashes why don't you look into the core dump? (In Windows, it's usually called somehow else... mini-dump or crash dump or so but I believe there is such an option as well.) I mean if you run your application in a debugger than it will stop in that case. (This is what I usually do to find such things.) However, I've seen that colleagues requested mini-dumps from customers to explore the call stack when our application crashed unexpectedly on customer side. It's not that convenient (for a release build) but may provide a hint... – Scheff's Cat Feb 11 '22 at 10:27
  • It could help to build a release with debug info so that you can see symbols (instead of just obscure addresses). – Scheff's Cat Feb 11 '22 at 10:31

0 Answers0