mirror of
https://github.com/aria2/aria2.git
synced 2025-01-08 11:01:38 +00:00
GnuTLS: Refine debug logging
This commit is contained in:
parent
3194174d4b
commit
4dab854e08
@ -68,7 +68,7 @@ void LogFactory::adjustDependentLevels() {
|
||||
}
|
||||
#ifdef HAVE_LIBGNUTLS
|
||||
if (level == Logger::A2_DEBUG) {
|
||||
gnutls_global_set_log_level(10);
|
||||
gnutls_global_set_log_level(6);
|
||||
}
|
||||
else {
|
||||
gnutls_global_set_log_level(0);
|
||||
|
@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user