#includeusing namespace std; using namespace Ice; int main(int argc, char* argv[]) { CommunicatorPtr communicator = Ice::initialize(argc, argv); // Get network configuration properties PropertiesPtr properties = communicator->getProperties(); string host = properties->getProperty("Ice.Default.Host"); string port = properties->getProperty("Ice.Default.Port"); cout << "Host: " << host << endl; cout << "Port: " << port << endl; communicator->shutdown(); return 0; }
#includeThis code retrieves the logging level and file configuration properties from the communicator object. Package/library: Ice (ZeroC Ice)using namespace std; using namespace Ice; int main(int argc, char* argv[]) { CommunicatorPtr communicator = Ice::initialize(argc, argv); // Get logging configuration properties PropertiesPtr properties = communicator->getProperties(); string logLevel = properties->getProperty("Ice.LogLevel"); string logFile = properties->getProperty("Ice.LogFile"); cout << "Log level: " << logLevel << endl; cout << "Log file: " << logFile << endl; communicator->shutdown(); return 0; }