mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/Logging: Add new function to include full stacktrace.
Note: It only has use for devs but makes it easier to get the error with a full trace
This commit is contained in:
@@ -1039,3 +1039,15 @@ void Log::outChat(const char * str, ...)
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
|
||||
void Log::outErrorST(const char * str, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, str);
|
||||
char nnew_str[MAX_QUERY_LEN];
|
||||
vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap);
|
||||
va_end(ap);
|
||||
|
||||
ACE_Stack_Trace st;
|
||||
outError("%s [Stacktrace: %s]", nnew_str, st.c_str());
|
||||
}
|
||||
|
||||
@@ -114,6 +114,7 @@ class Log
|
||||
void SetColor(bool stdout_stream, ColorTypes color);
|
||||
void ResetColor(bool stdout_stream);
|
||||
|
||||
void outErrorST( const char * err, ... ) ATTR_PRINTF(2, 3);
|
||||
void outDB( LogTypes type, const char * str );
|
||||
void outString( const char * str, ... ) ATTR_PRINTF(2, 3);
|
||||
void outString( );
|
||||
|
||||
Reference in New Issue
Block a user