Log message updates

Log message updates
This commit is contained in:
MassimilianoPinto
2015-11-06 18:28:41 +01:00
parent 00c506b029
commit 5e71ff093f
2 changed files with 6 additions and 5 deletions

View File

@ -912,9 +912,9 @@ ROUTER_SLAVE *slave = (ROUTER_SLAVE *)router_session;
if (slave->state > 0) { if (slave->state > 0) {
LOGIF(LM, (skygw_log_write_flush( LOGIF(LM, (skygw_log_write_flush(
LOGFILE_MESSAGE, LOGFILE_MESSAGE,
"%s: Slave %s, server id %d, disconnected after %ld seconds. " "%s: Slave %s:%d, server id %d, disconnected after %ld seconds. "
"%d SQL commands, %d events sent (%lu bytes), binlog '%s', last position %lu", "%d SQL commands, %d events sent (%lu bytes), binlog '%s', last position %lu",
router->service->name, slave->dcb->remote, router->service->name, slave->dcb->remote, slave->port,
slave->serverid, slave->serverid,
time(0) - slave->connect_time, time(0) - slave->connect_time,
slave->stats.n_queries, slave->stats.n_queries,

View File

@ -459,9 +459,10 @@ struct stat statb;
if (pos > router->binlog_position && !router->rotating) if (pos > router->binlog_position && !router->rotating)
{ {
/* Unsafe position, slave will be disconnected by the calling routine */ /* Unsafe position, slave will be disconnected by the calling routine */
snprintf(errmsg, BINLOG_ERROR_MSG_LEN, "Requested position %lu is not available. " snprintf(errmsg, BINLOG_ERROR_MSG_LEN, "Requested binlog position %lu. Position is unsafe so disconnecting. "
"Latest safe position %lu, end of binlog '%s' is %lu", "Latest safe position %lu, end of binlog file %lu",
pos, router->binlog_position, file->binlogname, router->current_pos); pos, router->binlog_position, router->current_pos);
hdr->ok = SLAVE_POS_READ_UNSAFE; hdr->ok = SLAVE_POS_READ_UNSAFE;
} else { } else {
/* accessing last position is ok */ /* accessing last position is ok */