1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

VCMIDirs update #4

Added stderr color handling
Updated logger to use boost::filesystem::path. Minor fixes.
Some classes are now structs.
This commit is contained in:
Karol
2014-08-11 20:17:17 +02:00
parent a302f6c7ad
commit c16e7d4bcf
9 changed files with 120 additions and 241 deletions

View File

@ -12,8 +12,7 @@ CBasicLogConfigurator::CBasicLogConfigurator(boost::filesystem::path && file_pat
void CBasicLogConfigurator::configureDefault()
{
CLogger::getGlobalLogger()->addTarget(make_unique<CLogConsoleTarget>(console));
// TODO: CLogFileTarget should take boost::filesystem::path as an argument
CLogger::getGlobalLogger()->addTarget(make_unique<CLogFileTarget>(file_path.string(), appendToLogFile));
CLogger::getGlobalLogger()->addTarget(make_unique<CLogFileTarget>(file_path, appendToLogFile));
appendToLogFile = true;
}
@ -69,9 +68,8 @@ void CBasicLogConfigurator::configure()
}
CLogger::getGlobalLogger()->addTarget(std::move(consoleTarget));
// TODO: CLogFileTarget should take boost::filesystem::path as an argument
// Add file target
auto fileTarget = make_unique<CLogFileTarget>(file_path.string(), appendToLogFile);
auto fileTarget = make_unique<CLogFileTarget>(file_path, appendToLogFile);
const JsonNode & fileNode = loggingNode["file"];
if(!fileNode.isNull())
{