ReactPhysics3D  v0.10.2
C++ Physics engine library
Loading...
Searching...
No Matches
reactphysics3d::DefaultLogger Class Reference

This class is the default logger class used to log information, warnings or errors during the execution of the library code for easier debugging. More...

#include <include/reactphysics3d/utils/DefaultLogger.h>

Inheritance diagram for reactphysics3d::DefaultLogger:
reactphysics3d::Logger

Classes

class  Destination
 destination for the logs More...
 
class  FileDestination
 File destination for the logs. More...
 
class  Formatter
 Log formatter. More...
 
class  HtmlFormatter
 Format the logs with HTML. More...
 
class  StreamDestination
 Stream destination for the logs. More...
 
class  TextFormatter
 Format the logs with simple text. More...
 

Public Types

enum class  Format { Text , HTML }
 Log verbosity level.
 
- Public Types inherited from reactphysics3d::Logger
enum class  Level { Error = 1 , Warning = 2 , Information = 4 }
 Log verbosity levels.
 
enum class  Category {
  PhysicCommon , World , Body , Joint ,
  Collider
}
 Log categories.
 

Public Member Functions

void addFileDestination (const std::string &filePath, uint logLevelFlag, Format format)
 Add a file destination to the logger.
 
void addStreamDestination (std::ostream &outputStream, uint logLevelFlag, Format format)
 Add a stream destination to the logger.
 
void removeAllDestinations ()
 Remove all logs destination previously set.
 
virtual void log (Level level, const std::string &physicsWorldName, Category category, const std::string &message, const char *filename, int lineNumber) override
 Log something.
 
- Public Member Functions inherited from reactphysics3d::Logger
 Logger ()=default
 Constructor.
 
virtual ~Logger ()=default
 Destructor.
 

Additional Inherited Members

- Static Public Member Functions inherited from reactphysics3d::Logger
static std::string getCategoryName (Category category)
 Return the name of a category.
 
static std::string getLevelName (Level level)
 Return the name of a level.
 

Detailed Description

This class is the default logger class used to log information, warnings or errors during the execution of the library code for easier debugging.

Member Function Documentation

◆ log()

void DefaultLogger::log ( Level  level,
const std::string &  physicsWorldName,
Category  category,
const std::string &  message,
const char *  filename,
int  lineNumber 
)
overridevirtual

Log something.

Implements reactphysics3d::Logger.


The documentation for this class was generated from the following files: