goto out;
}
- LOG(DEBUG1, "target: %s:%s (HTTP 1.%d)", host, port, version_minor);
+ LOG(DEBUG2, "target: %s:%s (HTTP 1.%d)", host, port, version_minor);
/* Connect to proxy server or directly to server. */
if (global_proxy_host != NULL && global_proxy_port != NULL) {
fds[1].events = POLLIN | POLLPRI | POLLHUP | POLLERR;
fds[1].revents = 0;
- LOG(DEBUG1, "transfer_data(): %d -> %d", client, server);
+ LOG(DEBUG2, "transfer_data(): %d -> %d", client, server);
for (;;) {
int result = poll(fds, 2 /* fd count */, -1 /* no timeout */);
if (gnutls_record_get_max_size(server_session) < buffer_size) {
buffer_size = gnutls_record_get_max_size(server_session);
}
- LOG(DEBUG1, "transfer_data_tls(): suggested buffer size: %ld",
+ LOG(DEBUG2, "transfer_data_tls(): suggested buffer size: %ld",
(long int)buffer_size);
for (;;) {
}
switch (level) {
- case LOG_ERROR_LEVEL: level_string = "ERROR"; break;
- case LOG_WARNING_LEVEL: level_string = "WARN "; break;
- case LOG_DEBUG1_LEVEL: level_string = "DEBUG"; break;
+ case LOG_ERROR_LEVEL: level_string = "ERROR "; break;
+ case LOG_WARNING_LEVEL: level_string = " WARN "; break;
+ case LOG_DEBUG1_LEVEL: level_string = "DEBUG1"; break;
+ case LOG_DEBUG2_LEVEL: level_string = "DEBUG2"; break;
default: level_string = "UNKNOWN";
}
#define ERROR LOG_ERROR_LEVEL, __FILE__, __LINE__
#define WARNING LOG_WARNING_LEVEL, __FILE__, __LINE__
#define DEBUG1 LOG_DEBUG1_LEVEL, __FILE__, __LINE__
+#define DEBUG2 LOG_DEBUG2_LEVEL, __FILE__, __LINE__
/* Log level constants. */
#define LOG_ERROR_LEVEL 0
#define LOG_WARNING_LEVEL 1
#define LOG_DEBUG1_LEVEL 2
+#define LOG_DEBUG2_LEVEL 3
/* Call log_message() and print current file and line number. */
#define LOG \
/* Default values. */
thread_count = 10;
#ifdef DEBUG
- global_log_level = LOG_DEBUG1_LEVEL;
+ global_log_level = LOG_DEBUG2_LEVEL;
#else
global_log_level = LOG_WARNING_LEVEL;
#endif
argv);
fprintf(stderr, "\n");
fprintf(stderr, "-a digest authentication file [default: none]\n");
- fprintf(stderr, "-d debug level: 0=errors only, 2=debug [default: 1]\n");
+ fprintf(stderr, "-d debug level: 0=errors only, 2=debug, 3=more debug [default: 1]\n");
fprintf(stderr, "-p proxy hostname and port\n");
fprintf(stderr, "-t number of threads [default: 10]\n");
fprintf(stderr, "-u passthrough connection if no certificate is stored \