ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
PyPrintLogger Class Reference

#include <PyPrintLogger.h>

Inheritance diagram for PyPrintLogger:
Collaboration diagram for PyPrintLogger:

Public Member Functions

 PyPrintLogger ()=default
 
 ~PyPrintLogger () override=default
 
void logMessage (const QString &message, int level) override
 Generic message logging method. More...
 
- Public Member Functions inherited from CVLog
virtual ~CVLog ()
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from CVLog
enum  MessageLevelFlags {
  LOG_VERBOSE = 0 , LOG_STANDARD = 1 , LOG_IMPORTANT = 2 , LOG_WARNING = 3 ,
  LOG_ERROR = 4 , DEBUG_FLAG = 8
}
 Message level. More...
 
- Static Public Member Functions inherited from CVLog
static CVLogTheInstance ()
 Returns the static and unique instance. More...
 
static void RegisterInstance (CVLog *logInstance)
 Registers a unique instance. More...
 
static void EnableMessageBackup (bool state)
 Enables the message backup system. More...
 
static int VerbosityLevel ()
 Returns the current verbosity level. More...
 
static void SetVerbosityLevel (int level)
 Sets the verbosity level. More...
 
static void LogMessage (const QString &message, int level)
 Static shortcut to CVLog::logMessage. More...
 
static bool PrintVerbose (const char *format,...)
 Prints out a verbose formatted message in console. More...
 
static bool PrintVerbose (const QString &message)
 QString version of ccLog::PrintVerbose. More...
 
static bool Print (const char *format,...)
 Prints out a formatted message in console. More...
 
static bool Print (const QString &message)
 QString version of ccLog::Print. More...
 
static bool PrintHigh (const char *format,...)
 Prints out an important formatted message in console. More...
 
static bool PrintHigh (const QString &message)
 QString version of ccLog::PrintHigh. More...
 
static bool PrintDebug (const char *format,...)
 Same as Print, but works only in Debug mode. More...
 
static bool PrintDebug (const QString &message)
 QString version of ccLog::PrintDebug. More...
 
static bool Warning (const char *format,...)
 Prints out a formatted warning message in console. More...
 
static bool Warning (const QString &message)
 QString version of ccLog::Warning. More...
 
static bool WarningDebug (const char *format,...)
 Same as Warning, but works only in Debug mode. More...
 
static bool WarningDebug (const QString &message)
 QString version of ccLog::WarningDebug. More...
 
static bool Error (const char *format,...)
 Display an error dialog with formatted message. More...
 
static bool Error (const QString &message)
 QString version of 'Error'. More...
 
static bool ErrorDebug (const char *format,...)
 Same as Error, but works only in Debug mode. More...
 
static bool ErrorDebug (const QString &message)
 QString version of ccLog::ErrorDebug. More...
 

Detailed Description

Logger that prints messages to the python stdout

It uses python's print internally.

The goal is to still be able to display messages logged via CVLog::.. in stand alone mode by registering this logger as the global instance.

Definition at line 25 of file PyPrintLogger.h.

Constructor & Destructor Documentation

◆ PyPrintLogger()

PyPrintLogger::PyPrintLogger ( )
default

◆ ~PyPrintLogger()

PyPrintLogger::~PyPrintLogger ( )
overridedefault

Member Function Documentation

◆ logMessage()

void PyPrintLogger::logMessage ( const QString &  message,
int  level 
)
overridevirtual

Generic message logging method.

To be implemented by child class.

Warning
MUST BE THREAD SAFE!
Parameters
messagemessage
levelmessage severity (see MessageLevelFlags)

Implements CVLog.

Definition at line 10 of file PyPrintLogger.cpp.


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