12 #ifndef __UT_UniversalLogEntry__
13 #define __UT_UniversalLogEntry__
27 template <
typename T>
class UT_Array;
70 : mySourceName(source_name),
72 mySourceContext(source_context),
73 mySourceCodeLocation(source_code_location),
75 myVerbosity(verbosity),
76 myTime(
SYStime() - theStartTime + theStartTimeSinceEpoch),
78 myExternalInfo(external_info)
91 : mySourceName(ec.category().
name())
92 , mySourceContext(source_context)
93 , mySourceCodeLocation(source_location)
95 , myVerbosity(verbosity)
96 , myTime(
SYStime() - theStartTime + theStartTimeSinceEpoch)
98 , myExternalInfo(external_info)
100 myMessage.format(
"{}: {}", what, ec.message());
106 return myTime < other.
myTime;
111 return sizeof(*this) +
112 mySourceName.length() +
114 mySourceContext.length() +
115 mySourceCodeLocation.getMemoryUsage(
false);
121 SYShashCombine(h, myMessage.hash());
122 SYShashCombine(h, mySourceContext.hash());
123 SYShashCombine(h, mySourceCodeLocation.source().hash());
124 SYShashCombine(h, SYSwang_inthash(mySourceCodeLocation.line()));
125 SYShashCombine(h, SYSwang_inthash(mySourceCodeLocation.columnStart()));
126 SYShashCombine(h, SYSwang_inthash(mySourceCodeLocation.columnEnd()));
127 SYShashCombine(h, SYSwang_inthash(myErrorSeverity));
128 SYShashCombine(h, SYSwang_inthash(myVerbosity));
129 SYShashCombine(h, SYSreal_hash(myTime));
130 SYShashCombine(h, SYSwang_inthash(myThreadId));
132 SYShashCombine(h, myExternalInfo->hash());
GLuint GLsizei const GLchar * message
UT_StringHolder mySourceName
UT_UniversalLogEntry(const UT_StringHolder &source_name=UT_StringHolder::theEmptyString, const UT_StringHolder &message=UT_StringHolder::theEmptyString, const UT_StringHolder &source_context=UT_StringHolder::theEmptyString, UT_ErrorSeverity severity=UT_ERROR_NONE, int verbosity=0, const UT_SourceLocation &source_code_location=UT_SourceLocation(), UT_UniversalLogExternalInfoHandle external_info=UT_UniversalLogExternalInfoHandle())
SYS_HashType hash() const
SYS_HashType hash() const
std::size_t SYS_HashType
Define the type for hash values.
JSON reader class which handles parsing of JSON or bJSON files.
Class which writes ASCII or binary JSON streams.
A reference counter base class for use with UT_IntrusivePtr.
UT_UniversalLogEntry(const UT_ErrorCode &ec, const UT_StringHolder &what, const UT_StringHolder &source_context=UT_StringHolder::theEmptyString, UT_ErrorSeverity severity=UT_ERROR_ABORT, int verbosity=0, const UT_SourceLocation &source_location=UT_SourceLocation(), UT_UniversalLogExternalInfoHandle external_info=UT_UniversalLogExternalInfoHandle())
static const UT_StringHolder theEmptyString
UT_StringHolder myCommandLine
UT_StringHolder myIdentifier
GLuint const GLchar * name
UT_Array< UT_UniversalLogEntry > UT_UniversalLogEntryArray
UT_StringHolder mySourceContext
UT_UniversalLogExternalInfoHandle myExternalInfo
std::error_code UT_ErrorCode
exint getMemoryUsage() const
UT_SourceLocation mySourceCodeLocation
UT_StringHolder myHostName
UT_StringHolder myMessage
GLfloat GLfloat GLfloat GLfloat h
static fpreal theStartTime
UT_IntrusivePtr< UT_UniversalLogExternalInfo > UT_UniversalLogExternalInfoHandle
UT_UniversalLogExternalInfo()
GLubyte GLubyte GLubyte GLubyte w
static fpreal theStartTimeSinceEpoch
bool operator<(const UT_UniversalLogEntry &other) const
The natural order of log messages is chronological.
Simple object to hold the data associated with a single log entry event.
UT_ErrorSeverity myErrorSeverity