&result);
if (status != MONGO_OK)
{
- ERROR ("mongodb plugin: Calling {\"serverStatus\": 1} failed: %i",
- (int) mc_connection.err);
+ ERROR ("mongodb plugin: Calling {\"serverStatus\": 1} failed: %s",
+ mc_connection.errstr);
return (-1);
}
&result);
if (status != MONGO_OK)
{
- ERROR ("mongodb plugin: Calling {\"dbstats\": 1} failed: %i",
- (int) mc_connection.err);
+ ERROR ("mongodb plugin: Calling {\"dbstats\": 1} failed: %s",
+ mc_connection.errstr);
return (-1);
}
(mc_port > 0) ? mc_port : MONGO_DEFAULT_PORT);
if (status != MONGO_OK)
{
- ERROR ("mongo plugin: Connecting to %s:%i failed with status %i.",
+ ERROR ("mongo plugin: Connecting to %s:%i failed: %s",
(mc_host != NULL) ? mc_host : MC_MONGO_DEF_HOST,
(mc_port > 0) ? mc_port : MONGO_DEFAULT_PORT,
- (int) mc_connection.err);
+ mc_connection.errstr);
return (-1);
}