mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-23 20:41:13 +00:00
Expose full logging to UI layer, pipe Qt messages etc into main logs
This commit is contained in:
1 parent
ccfa1ceaed
commit
bfac4adfb8
9 files changed
+59
-13
No files matched your search
@@ -81,7 +81,7 @@ float SRGB8_lookuptable[256] = {
|
||||
|
||||
void rdcassert(const char *msg, const char *file, unsigned int line, const char *func)
|
||||
{
|
||||
rdclog_int(RDCLog_Error, file, line, "Assertion failed: %s", msg);
|
||||
rdclog_int(RDCLog_Error, RDCLOG_PROJECT, file, line, "Assertion failed: %s", msg);
|
||||
}
|
||||
|
||||
#if 0
|
||||
@@ -319,7 +319,8 @@ void rdclogprint_int(LogType type, const char *fullMsg, const char *msg)
|
||||
const size_t rdclog_outBufSize = 4 * 1024;
|
||||
static char rdclog_outputBuffer[rdclog_outBufSize + 1];
|
||||
|
||||
void rdclog_int(LogType type, const char *file, unsigned int line, const char *fmt, ...)
|
||||
void rdclog_int(LogType type, const char *project, const char *file, unsigned int line,
|
||||
const char *fmt, ...)
|
||||
{
|
||||
if(type <= RDCLog_First || type >= RDCLog_NumTypes)
|
||||
{
|
||||
@@ -330,8 +331,6 @@ void rdclog_int(LogType type, const char *file, unsigned int line, const char *f
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
|
||||
const char *name = "RENDERDOC: ";
|
||||
|
||||
char timestamp[64] = {0};
|
||||
#if defined(INCLUDE_TIMESTAMP_IN_LOG)
|
||||
StringFormat::sntimef(timestamp, 63, "[%H:%M:%S] ");
|
||||
@@ -357,7 +356,7 @@ void rdclog_int(LogType type, const char *file, unsigned int line, const char *f
|
||||
char *output = rdclog_outputBuffer;
|
||||
size_t available = rdclog_outBufSize;
|
||||
|
||||
int numWritten = StringFormat::snprintf(output, available, "%s %s%s%s - ", name, timestamp,
|
||||
int numWritten = StringFormat::snprintf(output, available, "% 4s: %s%s%s - ", project, timestamp,
|
||||
location, typestr[type]);
|
||||
|
||||
if(numWritten < 0)
|
||||
|
||||
Reference in new issue
Block a user