if( false == node.valid() ) {
response.StatusCode = 400;
response.Content = "Node not found: " + propertyPath;
- SG_LOG(SG_NETWORK,SG_ALERT, response.Content );
+ SG_LOG(SG_NETWORK,SG_WARN, "Node not found: '" << response.Content << "'");
return true;
}
void PropertyChangeWebsocket::close()
{
- SG_LOG(SG_NETWORK, SG_ALERT, "closing PropertyChangeWebsocket #" << id);
+ SG_LOG(SG_NETWORK, SG_INFO, "closing PropertyChangeWebsocket #" << id);
_watchedNodes.clear();
}
string newValue;
if (_propertyChangeObserver->isChangedValue(node)) {
- SG_LOG(SG_NETWORK, SG_ALERT, "httpd: new Value for " << node->getPath(true) << " '" << node->getStringValue() << "' #" << id);
+ SG_LOG(SG_NETWORK, SG_DEBUG, "httpd: new Value for " << node->getPath(true) << " '" << node->getStringValue() << "' #" << id);
writer.writeText( JSON::toJsonString( false, node, 0 ) );
}
}
if (command == "addListener") {
for (iterator it = begin(); it != end(); ++it) {
if (node == (*it)->getPath(true)) {
- SG_LOG(SG_NETWORK, SG_ALERT, "httpd: " << command << " '" << node << "' ignored (duplicate)");
+ SG_LOG(SG_NETWORK, SG_WARN, "httpd: " << command << " '" << node << "' ignored (duplicate)");
return; // dupliate
}
}
SGPropertyNode_ptr n = propertyChangeObserver->addObservation(node);
if (n.valid()) push_back(n);
- SG_LOG(SG_NETWORK, SG_ALERT, "httpd: " << command << " '" << node << "'");
} else if (command == "removeListener") {
for (iterator it = begin(); it != end(); ++it) {
if (node == (*it)->getPath(true)) {
this->erase(it);
- SG_LOG(SG_NETWORK, SG_ALERT, "httpd: " << command << " '" << node << "'");
return;
}
- SG_LOG(SG_NETWORK, SG_ALERT, "httpd: " << command << " '" << node << "' ignored (not found)");
+ SG_LOG(SG_NETWORK, SG_WARN, "httpd: " << command << " '" << node << "' ignored (not found)");
}
}
}
fgSetString( propertyPath.c_str(), value );
}
catch( string & s ) {
- SG_LOG(SG_NETWORK,SG_ALERT, "httpd: setting " << propertyPath << " to '" << value << "' failed: " << s );
+ SG_LOG(SG_NETWORK,SG_WARN, "httpd: setting " << propertyPath << " to '" << value << "' failed: " << s );
}
}
fgSetString( pp, it->second );
}
catch( string & s ) {
- SG_LOG(SG_NETWORK,SG_ALERT, "httpd: setting " << pp << " to '" << it->second << "' failed: " << s );
+ SG_LOG(SG_NETWORK,SG_WARN, "httpd: setting " << pp << " to '" << it->second << "' failed: " << s );
}
}
}
node = fgGetNode( string("/") + propertyPath );
}
catch( string & s ) {
- SG_LOG(SG_NETWORK,SG_ALERT, "httpd: reading '" << propertyPath << "' failed: " << s );
+ SG_LOG(SG_NETWORK,SG_WARN, "httpd: reading '" << propertyPath << "' failed: " << s );
}
if( false == node.valid() ) {
DOMNode * headline = new DOMNode( "h3" );
}
response.Content = "command '" + command + "' failed.";
- SG_LOG( SG_NETWORK, SG_ALERT, response.Content );
+ SG_LOG( SG_NETWORK, SG_WARN, response.Content );
return true;
}
rewrites.append( fgRoot ).append( 1, '/' ).append( rhs );
}
}
- SG_LOG(SG_NETWORK,SG_ALERT,"url-rewrites='" << rewrites << "'" );
if( false == rewrites.empty() )
mg_set_option(_server, "url_rewrites", rewrites.c_str() );
}
Websocket * websocket = static_cast<Websocket*>(connection->connection_param);
if ( NULL == websocket) {
if (request.Uri.find("/PropertyListener") == 0) {
- SG_LOG(SG_ALL, SG_ALERT, "new PropertyChangeWebsocket for: " << request.Uri);
+ SG_LOG(SG_ALL, SG_INFO, "new PropertyChangeWebsocket for: " << request.Uri);
websocket = new PropertyChangeWebsocket(&_propertyChangeObserver);
connection->connection_param = websocket;
} else {