Paste: logger example
Author: | mgray |
Mode: | c++ |
Date: | Tue, 18 May 2010 21:49:46 |
Plain Text |
//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
bool
Application::parseConfigurationFile(const boost::filesystem::path& _configFile)
{
// TODO Log Debug
Zen::Utility::log_stream stream(m_pLogService->getStreamBuffer());
std::cout << "DEBUG: Parsing configuration file: " << _configFile.string() << std::endl;
stream << "DEBUG: Parsing configuration file: " << _configFile.string() << std::endl;
// TODO Make sure the required elements are present, etc and return false
// if any errors occur.
const bool rc = m_config.parse(_configFile);
// TODO Log Debug
std::cout << "DEBUG: Done parsing." << std::endl;
std::cout << "DEBUG: Application Id: " << getId() << std::endl;
std::cout << "DEBUG: Name: " << getName() << std::endl;
std::cout << "DEBUG: Version: " << getVersion() << std::endl;
std::cout << "DEBUG: Provider: " << getProviderName() << std::endl;
stream << "DEBUG: Done parsing." << std::endl;
stream << "DEBUG: Application Id: " << getId() << std::endl;
stream << "DEBUG: Name: " << getName() << std::endl;
stream << "DEBUG: Version: " << getVersion() << std::endl;
stream << "DEBUG: Provider: " << getProviderName() << std::endl;
return rc;
}
New Annotation