ZmqLogger: Add optional dumping to stderr

Add an openshot::Settings boolean `DEBUG_TO_STDERR`, which when
set true will direct all AppendDebugMethod() messages to std::clog,
in addition to (possibly) being sent over the ZeroMQ wire.
This commit is contained in:
FeRD (Frank Dana)
2020-02-01 02:00:43 -05:00
parent 49972b21e9
commit fc18366843
4 changed files with 60 additions and 46 deletions

View File

@@ -34,14 +34,14 @@ using namespace std;
using namespace openshot;
// Global reference to logger
// Global reference to Settings
Settings *Settings::m_pInstance = NULL;
// Create or Get an instance of the logger singleton
// Create or Get an instance of the settings singleton
Settings *Settings::Instance()
{
if (!m_pInstance) {
// Create the actual instance of logger only once
// Create the actual instance of Settings only once
m_pInstance = new Settings;
m_pInstance->HARDWARE_DECODER = 0;
m_pInstance->HIGH_QUALITY_SCALING = false;
@@ -55,6 +55,7 @@ Settings *Settings::Instance()
m_pInstance->HW_DE_DEVICE_SET = 0;
m_pInstance->HW_EN_DEVICE_SET = 0;
m_pInstance->PLAYBACK_AUDIO_DEVICE_NAME = "";
m_pInstance->DEBUG_TO_STDERR = false;
}
return m_pInstance;