diff --git a/src/logger.c b/src/logger.c
index e46d926f..9c2786fd 100644
--- a/src/logger.c
+++ b/src/logger.c
@@ -131,7 +131,7 @@ static void sptps_logger(sptps_t *s, int s_errno, const char *format, va_list ap
 		// but both types have the name and hostname fields at the same offsets.
 		connection_t *c = s->handle;
 		if(c)
-			snprintf(message + len, sizeof message - len, " from %s (%s)", c->name, c->hostname);
+			snprintf(message + len, sizeof message - len, " from %s (%s) [errno: %d]", c->name, c->hostname, s_errno);
 	}
 
 	real_logger(DEBUG_ALWAYS, LOG_ERR, message);