Fixed debug logging always being disabled.

Also corrected path argument for generating default settings file.
This commit is contained in:
WrinklyNinja
2014-07-12 21:13:45 +01:00
parent 21be0b752c
commit ab30aaf4ab
3 changed files with 5 additions and 6 deletions
+2 -3
View File
@@ -405,7 +405,7 @@ namespace loot {
}
//Default settings file generation.
void GenerateDefaultSettingsFile(const std::string& file) {
void GenerateDefaultSettingsFile(const boost::filesystem::path& file) {
BOOST_LOG_TRIVIAL(info) << "Generating default settings file.";
@@ -431,8 +431,7 @@ namespace loot {
yout.SetIndent(2);
yout << root;
boost::filesystem::path p(file);
loot::ofstream out(p);
loot::ofstream out(file);
out << yout.c_str();
out.close();
}
+1 -1
View File
@@ -42,7 +42,7 @@ namespace loot {
const bool masterlistUpdateEnabled);
//Default settings file generation.
void GenerateDefaultSettingsFile(const std::string& file);
void GenerateDefaultSettingsFile(const boost::filesystem::path& file);
}
namespace YAML {
+2 -2
View File
@@ -65,7 +65,7 @@ namespace loot {
catch (fs::filesystem_error& /*e*/) {
initError = "Error: Could not create local app data LOOT folder.";
}
GenerateDefaultSettingsFile(g_path_settings.string());
GenerateDefaultSettingsFile(g_path_settings);
}
try {
loot::ifstream in(g_path_settings);
@@ -201,7 +201,7 @@ namespace loot {
loot::Language lang(_settings["Language"].as<string>());
CefString(&cef_settings.locale).FromString(lang.Locale());
}
if (!_settings["Verbosity"] || _settings["Debug Verbosity"].as<unsigned int>() == 0)
if (!_settings["Debug Verbosity"] || _settings["Debug Verbosity"].as<unsigned int>() == 0)
cef_settings.log_severity = LOGSEVERITY_DISABLE;
// Use cef_settings.resources_dir_path to specify Resources folder path.