diff --git a/common/base/Credentials.cpp b/common/base/Credentials.cpp index 5ca797fed9..8af78464c1 100644 --- a/common/base/Credentials.cpp +++ b/common/base/Credentials.cpp @@ -124,7 +124,7 @@ bool SetUID(uid_t new_uid) { return false; #else if (setuid(new_uid)) { - OLA_WARN << "setuid failed with " << strerror(errno); + OLA_WARN << "setuid(" << new_uid << "): " << strerror(errno); return false; } return true; @@ -138,7 +138,7 @@ bool SetGID(gid_t new_gid) { return false; #else if (setgid(new_gid)) { - OLA_WARN << "setgid failed with " << strerror(errno); + OLA_WARN << "setgid(" << new_gid << "): " << strerror(errno); return false; } return true; diff --git a/common/io/IOUtils.cpp b/common/io/IOUtils.cpp index f979eae5cf..0c3ebc49bd 100644 --- a/common/io/IOUtils.cpp +++ b/common/io/IOUtils.cpp @@ -35,7 +35,7 @@ using std::string; bool Open(const string &path, int oflag, int *fd) { *fd = open(path.c_str(), oflag); if (*fd < 0) { - OLA_WARN << "Failed to open " << path << ": " << strerror(errno); + OLA_WARN << "open(" << path << "): " << strerror(errno); return false; } return true; diff --git a/common/network/Socket.cpp b/common/network/Socket.cpp index 25fa4ba9d6..6b14a1dfd3 100644 --- a/common/network/Socket.cpp +++ b/common/network/Socket.cpp @@ -148,7 +148,7 @@ bool UDPSocket::Bind(const IPV4SocketAddress &endpoint) { #else if (bind(m_handle, &server_address, sizeof(server_address)) == -1) { #endif - OLA_WARN << "Failed to bind " << endpoint << ", " << strerror(errno); + OLA_WARN << "bind(" << endpoint << "): " << strerror(errno); return false; } m_bound_to_port = true; diff --git a/common/network/TCPConnector.cpp b/common/network/TCPConnector.cpp index 2c7d4d673e..54c0fecb99 100644 --- a/common/network/TCPConnector.cpp +++ b/common/network/TCPConnector.cpp @@ -85,7 +85,8 @@ TCPConnector::TCPConnectionID TCPConnector::Connect( if (errno != EINPROGRESS) { #endif int error = errno; - OLA_WARN << "connect to " << endpoint << " failed, " << strerror(error); + OLA_WARN << "connect() to " << endpoint << " returned, " + << strerror(error); close(sd); callback->Run(-1, error); return 0; @@ -169,11 +170,12 @@ void TCPConnector::SocketWritable(PendingTCPConnection *connection) { #else int r = getsockopt(sd, SOL_SOCKET, SO_ERROR, &error, &len); #endif - if (r < 0) + if (r < 0) { error = errno; + } if (error) { - OLA_WARN << "Failed to connect to " << connection->ip_address << " error " + OLA_WARN << "connect() to " << connection->ip_address << " returned: " << strerror(error); connection->Close(); connection->callback->Run(-1, error); diff --git a/common/network/TCPSocket.cpp b/common/network/TCPSocket.cpp index 1c410c65f2..e7efe26ac3 100644 --- a/common/network/TCPSocket.cpp +++ b/common/network/TCPSocket.cpp @@ -152,7 +152,7 @@ TCPSocket* TCPSocket::Connect(const SocketAddress &endpoint) { int r = connect(sd, &server_address, sizeof(server_address)); if (r) { - OLA_WARN << "connect to " << endpoint << " failed, " << strerror(errno); + OLA_WARN << "connect(" << endpoint << "): " << strerror(errno); return NULL; } TCPSocket *socket = new TCPSocket(sd); diff --git a/common/rdm/DiscoveryAgent.cpp b/common/rdm/DiscoveryAgent.cpp index 96d1dbed85..3496475d07 100644 --- a/common/rdm/DiscoveryAgent.cpp +++ b/common/rdm/DiscoveryAgent.cpp @@ -189,7 +189,7 @@ void DiscoveryAgent::MaybeMuteNextDevice() { void DiscoveryAgent::IncrementalMuteComplete(bool status) { if (!status) { m_uids.RemoveUID(m_muting_uid); - OLA_WARN << "Mute of " << m_muting_uid << " failed, device has gone"; + OLA_WARN << "Unable to mute " << m_muting_uid << ", device has gone"; } else { OLA_DEBUG << "Muted " << m_muting_uid; } diff --git a/common/rdm/PidStoreLoader.cpp b/common/rdm/PidStoreLoader.cpp index 9e684f9096..020a8737d3 100644 --- a/common/rdm/PidStoreLoader.cpp +++ b/common/rdm/PidStoreLoader.cpp @@ -340,11 +340,11 @@ const Descriptor* PidStoreLoader::FrameFormatToDescriptor( } // we don't give these descriptors names - const Descriptor *descriptor = new Descriptor("", fields); + const Descriptor *descriptor = new Descriptor("", fields); if (validate) { if (!m_checker.CheckConsistency(descriptor)) { - OLA_WARN << "Frame format failed consistency check!"; + OLA_WARN << "Invalid frame format"; delete descriptor; return NULL; } diff --git a/common/web/JsonLexer.cpp b/common/web/JsonLexer.cpp index 534cda4826..07dcaea0c0 100644 --- a/common/web/JsonLexer.cpp +++ b/common/web/JsonLexer.cpp @@ -271,7 +271,7 @@ static bool ParseArray(const char **input, JsonParserInterface *parser) { bool result = ParseTrimmedInput(input, parser); if (!result) { - OLA_INFO << "input failed"; + OLA_INFO << "Invalid input"; return false; } diff --git a/plugins/usbpro/DmxTriWidget.cpp b/plugins/usbpro/DmxTriWidget.cpp index ca9486271e..65fa6632e4 100644 --- a/plugins/usbpro/DmxTriWidget.cpp +++ b/plugins/usbpro/DmxTriWidget.cpp @@ -333,7 +333,7 @@ void DmxTriWidgetImpl::SendDiscoveryAuto() { uint8_t command_id = DISCOVER_AUTO_COMMAND_ID; if (!SendCommandToTRI(EXTENDED_COMMAND_LABEL, &command_id, sizeof(command_id))) { - OLA_WARN << "Failed to begin RDM discovery"; + OLA_WARN << "Unable to begin RDM discovery"; RDMDiscoveryCallback *callback = m_discovery_callback; m_discovery_callback = NULL; RunDiscoveryCallback(callback); @@ -595,7 +595,7 @@ void DmxTriWidgetImpl::HandleDiscoverStatResponse(uint8_t return_code, // These are all fatal switch (return_code) { case EC_RESPONSE_MUTE: - OLA_WARN << "Failed to mute device, aborting discovery"; + OLA_WARN << "Unable to mute device, aborting discovery"; break; case EC_RESPONSE_DISCOVERY: OLA_WARN << diff --git a/plugins/usbpro/EnttecUsbProWidget.cpp b/plugins/usbpro/EnttecUsbProWidget.cpp index 4adbd7c453..810a811afb 100644 --- a/plugins/usbpro/EnttecUsbProWidget.cpp +++ b/plugins/usbpro/EnttecUsbProWidget.cpp @@ -374,7 +374,7 @@ void EnttecPortImpl::HandleRDMTimeout(unsigned int length) { } else if (m_mute_callback) { MuteDeviceCallback *callback = m_mute_callback; m_mute_callback = NULL; - OLA_INFO << "Failed to mute device"; + OLA_INFO << "Unable to mute device"; callback->Run(false); } else if (m_branch_callback) { BranchCallback *callback = m_branch_callback; diff --git a/slp/DATracker.cpp b/slp/DATracker.cpp index 49e1bfe573..c8ba7f9d28 100644 --- a/slp/DATracker.cpp +++ b/slp/DATracker.cpp @@ -257,7 +257,7 @@ bool DATracker::AddressFromURL(const string &url, IPV4Address *address) { ok = IPV4Address::FromString(url.substr(m_da_service_prefix.size()), address); if (!ok) - OLA_WARN << "Failed to extract IP from " + OLA_WARN << "Unable to extract IP from " << url.substr(m_da_service_prefix.size()); } else { OLA_WARN << url << " did not start with " << m_da_service_prefix;