mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 06:27:45 +00:00
override StackWalker OnOutput to write to output using our logger util
This commit is contained in:
parent
82ecc83951
commit
482eea8fd1
1 changed files with 13 additions and 1 deletions
|
@ -8,8 +8,20 @@
|
||||||
#include <cxxabi.h>
|
#include <cxxabi.h>
|
||||||
#else
|
#else
|
||||||
#include <stackwalker/StackWalker.h>
|
#include <stackwalker/StackWalker.h>
|
||||||
|
|
||||||
|
class SapphireStackWalker : public StackWalker
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SapphireStackWalker() : StackWalker() {}
|
||||||
|
protected:
|
||||||
|
virtual void OnOutput( LPCSTR szText )
|
||||||
|
{
|
||||||
|
Logger::critical( szText );
|
||||||
|
}
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
using namespace Sapphire::Common;
|
using namespace Sapphire::Common;
|
||||||
|
|
||||||
Util::CrashHandler::CrashHandler()
|
Util::CrashHandler::CrashHandler()
|
||||||
|
@ -137,7 +149,7 @@ void Util::CrashHandler::printStackTrace( unsigned int max_frames )
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
StackWalker sw;
|
SapphireStackWalker sw;
|
||||||
sw.ShowCallstack();
|
sw.ShowCallstack();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue