// TODO: Build a real services.xml for windows development. // and remove the base_url logic below. std::string LLServiceBuilder::buildServiceURI(const std::string& service_name) const { std::ostringstream service_url; // Find the service builder std::map<std::string, std::string>::const_iterator it = mServiceMap.find(service_name); if(it != mServiceMap.end()) { // construct the service builder url LLApp* app = LLApp::instance(); if(app) { // We define a base-url for some development configurations // In production neither of these are defined and all services have full urls LLSD base_url; if (starts_with(service_name,"cap")) { base_url = app->getOption("cap-base-url"); } if (base_url.asString().empty()) { base_url = app->getOption("services-base-url"); } service_url << base_url.asString(); } service_url << it->second; } else { llwarns << "Cannot find service " << service_name << llendl; } return service_url.str(); }
//@brief Function to check if specified legacy log message should be sent. bool LLLogImpl::useLegacyLogMessage(const std::string &message) { LLSD log_config = mApp->getOption("log-messages"); if (log_config.has(message)) { LLSD message_config = log_config[message]; if (message_config.has("use-legacy")) { return message_config["use-legacy"].asBoolean(); } } return true; }
//@brief Function to log a message to syslog for streambase to collect. void LLLogImpl::log(const std::string message, LLSD& info) { static S32 sequence = 0; LLSD log_config = mApp->getOption("log-messages"); if (log_config.has(message)) { LLSD message_config = log_config[message]; if (message_config.has("use-syslog")) { if (! message_config["use-syslog"].asBoolean()) { return; } } } llinfos << "LLLOGMESSAGE (" << (sequence++) << ") " << message << " " << LLSDNotationStreamer(info) << llendl; }