Only log an error if the binlog file exists
The avrorouter logged an error every time it tried to open a file even if the file doesn't exist.
This commit is contained in:
@ -67,7 +67,12 @@ bool avro_open_binlog(const char *binlogdir, const char *file, int *dest)
|
|||||||
|
|
||||||
if ((fd = open(path, O_RDONLY)) == -1)
|
if ((fd = open(path, O_RDONLY)) == -1)
|
||||||
{
|
{
|
||||||
MXS_ERROR("Failed to open binlog file %s.", path);
|
if (errno != ENOENT)
|
||||||
|
{
|
||||||
|
char err[STRERROR_BUFLEN];
|
||||||
|
MXS_ERROR("Failed to open binlog file %s: %d, %s", path, errno,
|
||||||
|
strerror_r(errno, err, sizeof(err)));
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user