diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-21 16:44:06 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-21 16:44:06 +0100 |
| commit | 71d8cf20889a3c419c9a3e485f461236e5317423 (patch) | |
| tree | fb2108412c8a172b423cfe48b15a5f31617eade3 /src/lib/config.cc | |
| parent | d2fef4faff679d564a72543c858c4bfb62f85791 (diff) | |
Tidy up logging a bit. Make it configurable from the GUI.
Diffstat (limited to 'src/lib/config.cc')
| -rw-r--r-- | src/lib/config.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc index 40ae3971b..6d029dd1f 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -73,6 +73,7 @@ Config::Config () , _check_for_updates (false) , _check_for_test_updates (false) , _maximum_j2k_bandwidth (250000000) + , _log_types (Log::GENERAL | Log::WARNING | Log::ERROR) { _allowed_dcp_frame_rates.push_back (24); _allowed_dcp_frame_rates.push_back (25); @@ -189,6 +190,8 @@ Config::read () _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); } void @@ -366,6 +369,7 @@ Config::write () const root->add_child("MaximumJ2KBandwidth")->add_child_text (raw_convert<string> (_maximum_j2k_bandwidth)); root->add_child("AllowAnyDCPFrameRate")->add_child_text (_allow_any_dcp_frame_rate ? "1" : "0"); + root->add_child("LogTypes")->add_child_text (raw_convert<string> (_log_types)); doc.write_to_file_formatted (file(false).string ()); } |
