, _check_for_updates (false)
, _check_for_test_updates (false)
, _maximum_j2k_bandwidth (250000000)
- , _log_types (Log::GENERAL | Log::WARNING | Log::ERROR)
+ , _log_types (Log::TYPE_GENERAL | Log::TYPE_WARNING | Log::TYPE_ERROR)
{
_allowed_dcp_frame_rates.push_back (24);
_allowed_dcp_frame_rates.push_back (25);
_maximum_j2k_bandwidth = f.optional_number_child<int> ("MaximumJ2KBandwidth").get_value_or (250000000);
_allow_any_dcp_frame_rate = f.optional_bool_child ("AllowAnyDCPFrameRate");
- _log_types = f.optional_number_child<int> ("LogTypes").get_value_or (Log::GENERAL | Log::WARNING | Log::ERROR);
+ _log_types = f.optional_number_child<int> ("LogTypes").get_value_or (Log::TYPE_GENERAL | Log::TYPE_WARNING | Log::TYPE_ERROR);
}
void
#include "i18n.h"
-#define LOG_GENERAL(...) log->log (String::compose (__VA_ARGS__), Log::GENERAL);
-#define LOG_ERROR(...) log->log (String::compose (__VA_ARGS__), Log::ERROR);
+#define LOG_GENERAL(...) log->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL);
+#define LOG_ERROR(...) log->log (String::compose (__VA_ARGS__), Log::TYPE_ERROR);
using std::pair;
using std::list;
#include "cross.h"
#include "player_video_frame.h"
-#define LOG_GENERAL(...) _log->log (String::compose (__VA_ARGS__), Log::GENERAL);
+#define LOG_GENERAL(...) _log->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL);
#include "i18n.h"
#include "i18n.h"
-#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::GENERAL);
-#define LOG_ERROR(...) _film->log()->log (String::compose (__VA_ARGS__), Log::ERROR);
-#define LOG_TIMING(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TIMING);
+#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL);
+#define LOG_ERROR(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_ERROR);
+#define LOG_TIMING(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_TIMING);
using std::pair;
using std::string;
#include "i18n.h"
-#define LOG_GENERAL(...) film->log()->log (String::compose (__VA_ARGS__), Log::GENERAL);
+#define LOG_GENERAL(...) film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL);
using std::string;
using std::stringstream;
#include "i18n.h"
-#define LOG_GENERAL(...) film->log()->log (String::compose (__VA_ARGS__), Log::GENERAL);
-#define LOG_ERROR(...) film->log()->log (String::compose (__VA_ARGS__), Log::ERROR);
-#define LOG_WARNING(...) film->log()->log (__VA_ARGS__, Log::WARNING);
+#define LOG_GENERAL(...) film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL);
+#define LOG_ERROR(...) film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_ERROR);
+#define LOG_WARNING(...) film->log()->log (__VA_ARGS__, Log::TYPE_WARNING);
using std::cout;
using std::string;
using libdcp::Signer;
using libdcp::raw_convert;
-#define LOG_GENERAL(...) log()->log (String::compose (__VA_ARGS__), Log::GENERAL);
-#define LOG_GENERAL_NC(...) log()->log (__VA_ARGS__, Log::GENERAL);
+#define LOG_GENERAL(...) log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL);
+#define LOG_GENERAL_NC(...) log()->log (__VA_ARGS__, Log::TYPE_GENERAL);
/* 5 -> 6
* AudioMapping XML changed.
#include "i18n.h"
-#define LOG_TIMING(...) _log->microsecond_log (String::compose (__VA_ARGS__), Log::TIMING);
+#define LOG_TIMING(...) _log->microsecond_log (String::compose (__VA_ARGS__), Log::TYPE_TIMING);
using std::cout;
using std::string;
using boost::algorithm::is_any_of;
using boost::algorithm::split;
-int const Log::GENERAL = 0x1;
-int const Log::WARNING = 0x2;
-int const Log::ERROR = 0x4;
-int const Log::TIMING = 0x8;
+int const Log::TYPE_GENERAL = 0x1;
+int const Log::TYPE_WARNING = 0x2;
+int const Log::TYPE_ERROR = 0x4;
+int const Log::TYPE_TIMING = 0x8;
Log::Log ()
: _types (0)
stringstream s;
s << a.substr (0, a.length() - 1) << N_(": ");
- if (type & ERROR) {
+ if (type & TYPE_ERROR) {
s << "ERROR: ";
}
- if (type & WARNING) {
+ if (type & TYPE_WARNING) {
s << "WARNING: ";
}
for (vector<string>::const_iterator i = types.begin(); i != types.end(); ++i) {
if (*i == N_("general")) {
- _types |= GENERAL;
+ _types |= TYPE_GENERAL;
} else if (*i == N_("warning")) {
- _types |= WARNING;
+ _types |= TYPE_WARNING;
} else if (*i == N_("error")) {
- _types |= ERROR;
+ _types |= TYPE_ERROR;
} else if (*i == N_("timing")) {
- _types |= TIMING;
+ _types |= TYPE_TIMING;
}
}
}
Log ();
virtual ~Log () {}
- static const int GENERAL;
- static const int WARNING;
- static const int ERROR;
- static const int TIMING;
+ static const int TYPE_GENERAL;
+ static const int TYPE_WARNING;
+ static const int TYPE_ERROR;
+ static const int TYPE_TIMING;
void log (std::string message, int type);
void microsecond_log (std::string message, int type);
#include "scaler.h"
#include "player_video_frame.h"
-#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::GENERAL);
+#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL);
using std::list;
using std::cout;
#include "i18n.h"
-#define LOG_GENERAL_NC(...) _film->log()->microsecond_log (__VA_ARGS__, Log::GENERAL);
+#define LOG_GENERAL_NC(...) _film->log()->log (__VA_ARGS__, Log::TYPE_GENERAL);
using std::string;
using std::stringstream;
#include "i18n.h"
-#define LOG_GENERAL(...) _log->microsecond_log (String::compose (__VA_ARGS__), Log::GENERAL);
-#define LOG_GENERAL_NC(...) _log->microsecond_log (__VA_ARGS__, Log::GENERAL);
-#define LOG_ERROR(...) _log->microsecond_log (String::compose (__VA_ARGS__), Log::ERROR);
-#define LOG_ERROR_NC(...) _log->microsecond_log (__VA_ARGS__, Log::ERROR);
+#define LOG_GENERAL(...) _log->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL);
+#define LOG_GENERAL_NC(...) _log->log (__VA_ARGS__, Log::TYPE_GENERAL);
+#define LOG_ERROR(...) _log->log (String::compose (__VA_ARGS__), Log::TYPE_ERROR);
+#define LOG_ERROR_NC(...) _log->log (__VA_ARGS__, Log::TYPE_ERROR);
using std::string;
using std::stringstream;
#include "i18n.h"
-#define LOG_GENERAL_NC(...) _film->log()->microsecond_log (__VA_ARGS__, Log::GENERAL);
-#define LOG_ERROR_NC(...) _film->log()->microsecond_log (__VA_ARGS__, Log::ERROR);
+#define LOG_GENERAL_NC(...) _film->log()->log (__VA_ARGS__, Log::TYPE_GENERAL);
+#define LOG_ERROR_NC(...) _film->log()->log (__VA_ARGS__, Log::TYPE_ERROR);
using std::string;
using std::stringstream;
#include "i18n.h"
-#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::GENERAL);
-#define LOG_TIMING(...) _film->log()->microsecond_log (String::compose (__VA_ARGS__), Log::TIMING);
-#define LOG_WARNING_NC(...) _film->log()->log (__VA_ARGS__, Log::WARNING);
+#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL);
+#define LOG_TIMING(...) _film->log()->microsecond_log (String::compose (__VA_ARGS__), Log::TYPE_TIMING);
+#define LOG_WARNING_NC(...) _film->log()->log (__VA_ARGS__, Log::TYPE_WARNING);
/* OS X strikes again */
#undef set_key
_maximum_j2k_bandwidth->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&AdvancedPage::maximum_j2k_bandwidth_changed, this));
_allow_any_dcp_frame_rate->SetValue (config->allow_any_dcp_frame_rate ());
_allow_any_dcp_frame_rate->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&AdvancedPage::allow_any_dcp_frame_rate_changed, this));
- _log_general->SetValue (config->log_types() & Log::GENERAL);
+ _log_general->SetValue (config->log_types() & Log::TYPE_GENERAL);
_log_general->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&AdvancedPage::log_changed, this));
- _log_warning->SetValue (config->log_types() & Log::WARNING);
+ _log_warning->SetValue (config->log_types() & Log::TYPE_WARNING);
_log_warning->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&AdvancedPage::log_changed, this));
- _log_error->SetValue (config->log_types() & Log::ERROR);
+ _log_error->SetValue (config->log_types() & Log::TYPE_ERROR);
_log_error->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&AdvancedPage::log_changed, this));
- _log_timing->SetValue (config->log_types() & Log::TIMING);
+ _log_timing->SetValue (config->log_types() & Log::TYPE_TIMING);
_log_timing->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&AdvancedPage::log_changed, this));
return panel;
{
int types = 0;
if (_log_general->GetValue ()) {
- types |= Log::GENERAL;
+ types |= Log::TYPE_GENERAL;
}
if (_log_warning->GetValue ()) {
- types |= Log::WARNING;
+ types |= Log::TYPE_WARNING;
}
if (_log_error->GetValue ()) {
- types |= Log::ERROR;
+ types |= Log::TYPE_ERROR;
}
if (_log_timing->GetValue ()) {
- types |= Log::TIMING;
+ types |= Log::TYPE_TIMING;
}
Config::instance()->set_log_types (types);
}