summaryrefslogtreecommitdiff
path: root/src/Platform.cc
diff options
context:
space:
mode:
authorNils Maier <maierman@web.de>2014-01-06 17:43:47 +0100
committerNils Maier <maierman@web.de>2014-01-06 17:46:21 +0100
commit4dab854e0867a43b06ee72eefe59553c5ea4653e (patch)
tree7748ba37134a9cb2cb6337bd84efb50fe7395111 /src/Platform.cc
parent3194174d4b7746130582544ebd18f3318d2a9d81 (diff)
GnuTLS: Refine debug logging
Diffstat (limited to 'src/Platform.cc')
-rw-r--r--src/Platform.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Platform.cc b/src/Platform.cc
index e04f4fc1..96c12db1 100644
--- a/src/Platform.cc
+++ b/src/Platform.cc
@@ -74,7 +74,10 @@ namespace {
void gnutls_log_callback(int level, const char *str)
{
using namespace aria2;
- A2_LOG_DEBUG(fmt("GNUTLS: %d / %s", level, str));
+ // GnuTLS adds a newline. Drop it.
+ std::string msg(str);
+ msg.resize(msg.size() - 1);
+ A2_LOG_DEBUG(fmt("GnuTLS: <%d> %s", level, msg.c_str()));
}
}