 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
23 template <enum CVLog::MessageLevelFlags level>
class ccLogger
108 auto *wcharArray =
new wchar_t[
string.size() + 1];
109 const int len =
string.toWCharArray(wcharArray);
110 Q_ASSERT(len <=
string.
size());
111 wcharArray[len] =
'\0';
118 const wchar_t *pythonPath = Py_GetPath();
119 if (pythonPath !=
nullptr)
122 char *cPythonPath = Py_EncodeLocale(pythonPath, &errPos);
125 CVLog::Print(
"[PythonRuntime] PythonPath is set to: %s", cPythonPath);
126 PyMem_Free(cPythonPath);
130 CVLog::Print(
"[PythonRuntime] Failed to convert the PythonPath");
142 const wchar_t *pythonHome = Py_GetPythonHome();
143 if (pythonHome !=
nullptr)
146 char *cPythonHome = Py_EncodeLocale(pythonHome, &errPos);
149 CVLog::Print(
"[PythonRuntime] PythonHome is set to: %s", cPythonHome);
150 PyMem_Free(cPythonHome);
154 CVLog::Print(
"[PythonRuntime]Failed to convert the PythonHome path");
ccLogger & operator<<(const qsizetype value)
Definition: Utilities.h:54
static bool Print(const char *format,...)
Prints out a formatted message in console.
Definition: CVLog.cpp:113
static void LogMessage(const QString &message, int level)
Static shortcut to CVLog::logMessage.
Definition: CVLog.cpp:64
wchar_t * QStringToWcharArray(const QString &string)
Returns a newly allocated wchar_t array (null terminated) from a QString.
Definition: Utilities.h:106
QString m_message
Definition: Utilities.h:67
PluginLogger()
Definition: Utilities.h:88
Definition: Utilities.h:23
ccLogger & operator<<(const char *message)
Definition: Utilities.h:42
int size
Definition: FileIOFactory.cpp:130
ccLogger & operator<<(int value)
Definition: Utilities.h:48
ccLogger()
Definition: Utilities.h:26
void LogPythonHome()
Logs the PYTHON_HOME the log console of ACloudViewer.
Definition: Utilities.h:140
void flush()
Definition: Utilities.h:60
ccLogger & operator<<(const QString &message)
Definition: Utilities.h:36
void LogPythonPath()
Logs the PYTHON_PATH the log console of ACloudViewer.
Definition: Utilities.h:116
Definition: Utilities.h:85
virtual ~ccLogger()
Definition: Utilities.h:31