Documentation for Logger
Former-commit-id: b09dda8a542782667070ea8bf912b552dd6b478a
This commit is contained in:
@@ -11,17 +11,34 @@ namespace Nz
|
||||
namespace
|
||||
{
|
||||
const char* errorType[] = {
|
||||
"Assert failed: ", // ErrorType_AssertFailed
|
||||
"Internal error: ", // ErrorType_Internal
|
||||
"Error: ", // ErrorType_Normal
|
||||
"Warning: " // ErrorType_Warning
|
||||
"Assert failed: ", // ErrorType_AssertFailed
|
||||
"Internal error: ", // ErrorType_Internal
|
||||
"Error: ", // ErrorType_Normal
|
||||
"Warning: " // ErrorType_Warning
|
||||
};
|
||||
|
||||
static_assert(sizeof(errorType) / sizeof(const char*) == ErrorType_Max + 1, "Error type array is incomplete");
|
||||
}
|
||||
|
||||
/*!
|
||||
* \class Nz::AbstractLogger<T>
|
||||
* \brief Core class that represents the behaviour of the log classes
|
||||
*
|
||||
* \remark This class is abstract
|
||||
*/
|
||||
|
||||
AbstractLogger::~AbstractLogger() = default;
|
||||
|
||||
/*!
|
||||
* \brief Writes the error in StringStream
|
||||
*
|
||||
* \param type Enumeration of type ErrorType
|
||||
* \param error String describing the error
|
||||
* \param line Line number in the file
|
||||
* \param file Filename
|
||||
* \param function Name of the function throwing the error
|
||||
*/
|
||||
|
||||
void AbstractLogger::WriteError(ErrorType type, const String& error, unsigned int line, const char* file, const char* function)
|
||||
{
|
||||
StringStream stream;
|
||||
|
||||
Reference in New Issue
Block a user