Convert old logging calls to new logging macros
This commit is contained in:
parent
6390c66e95
commit
0600e2d8b5
65 changed files with 502 additions and 516 deletions
|
@ -22,17 +22,17 @@ Config::Config() {
|
|||
bool Config::LoadINI(INIReader* config, const char* location, const std::string& default_contents, bool retry) {
|
||||
if (config->ParseError() < 0) {
|
||||
if (retry) {
|
||||
ERROR_LOG(CONFIG, "Failed to load %s. Creating file from defaults...", location);
|
||||
LOG_WARNING(Config, "Failed to load %s. Creating file from defaults...", location);
|
||||
FileUtil::CreateFullPath(location);
|
||||
FileUtil::WriteStringToFile(true, default_contents, location);
|
||||
*config = INIReader(location); // Reopen file
|
||||
|
||||
return LoadINI(config, location, default_contents, false);
|
||||
}
|
||||
ERROR_LOG(CONFIG, "Failed.");
|
||||
LOG_ERROR(Config, "Failed.");
|
||||
return false;
|
||||
}
|
||||
INFO_LOG(CONFIG, "Successfully loaded %s", location);
|
||||
LOG_INFO(Config, "Successfully loaded %s", location);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue