int rval = read(sockfd, buf, sizeof(buf));
if (rval < 0) {
// Read failed
- LOG_WARN(command_logger, COMMAND_SOCKET_READ_FAIL).arg(rval).arg(sockfd);
+ LOG_ERROR(command_logger, COMMAND_SOCKET_READ_FAIL).arg(rval).arg(sockfd);
/// @todo: Should we close the connection, similar to what is already
/// being done for rval == 0?
if (len > 65535) {
// Hmm, our response is too large. Let's send the first
// 64KB and hope for the best.
- LOG_WARN(command_logger, COMMAND_SOCKET_RESPONSE_TOOLARGE).arg(len);
+ LOG_ERROR(command_logger, COMMAND_SOCKET_RESPONSE_TOOLARGE).arg(len);
len = 65535;
}
// Response transmission failed. Since the response failed, it doesn't
// make sense to send any status codes. Let's log it and be done with
// it.
- LOG_WARN(command_logger, COMMAND_SOCKET_WRITE_FAIL).arg(len).arg(sockfd);
+ LOG_ERROR(command_logger, COMMAND_SOCKET_WRITE_FAIL).arg(len).arg(sockfd);
}
}
/// @brief Auxiliary method for creating a UNIX socket
///
/// @param file_name specifies socket file path
+ /// @return socket file descriptor
int createUnixSocket(const std::string& file_name) {
int fd = socket(AF_UNIX, SOCK_STREAM, 0);
over command socket identified by specified file descriptor.
% COMMAND_SOCKET_READ_FAIL Encountered error %1 while reading from command socket %2
-This warning message indicates that an error was encountered while
+This error message indicates that an error was encountered while
reading from command socket.
% COMMAND_SOCKET_WRITE Sent response of %1 bytes over command socket %2
over command socket identifier by the specified file descriptor.
% COMMAND_SOCKET_RESPONSE_TOOLARGE Server's response was larger (%1) than supported 64KB
-This warning message indicates that the server received a command and generated
+This error message indicates that the server received a command and generated
an answer for it, but that response was larger than supported 64KB. Server
will attempt to send the first 64KB of the response. Depending on the nature
of this response, this may indicate a software or configuration error. Future
Kea versions are expected to have better support for large responses.
% COMMAND_SOCKET_WRITE_FAIL Error while writing %1 bytes to command socket %2
-This warning message indicates that an error was encountered while
+This error message indicates that an error was encountered while
attempting to send a response to the command socket.
% COMMAND_SOCKET_UNIX_OPEN Command socket opened: UNIX, fd=%1, path=%2