Adding a SoupLogger with SOUP_LOGGER_LEVEL_NONE to a SoupSession causes two newlines to be printed to the console in my application
The logger is instantiated like so
g_autoptr(SoupLogger) logger = soup_logger_new(SOUP_LOGGER_LOG_NONE, -1);
The session is instantiated like so
g_autoptr(SoupSession) session = soup_session_new_with_options(SOUP_SESSION_MAX_CONNS,
max_connections, SOUP_SESSION_USER_AGENT, user_agent->str, SOUP_SESSION_ADD_FEATURE_BY_TYPE,
SOUP_TYPE_CONTENT_SNIFFER, SOUP_SESSION_ADD_FEATURE, SOUP_SESSION_FEATURE(logger), NULL);
When I remove the logger feature from the session constructor, no newlines are printed to the console.
My small amount of debugging leads me to the following conclusion. Attached is a sample of SOUP_LOGGER_LOG_MINIMAL
. In it you will notice two things. Two lines with 2 spaces to begin the lines although they are empty lines (4, 8).
Here is a sample output of SOUP_LOGGER_LOG_NONE
. In it you will notice that lines one and two both have two spaces preceding them. I believe these are the same lines as 4 and 8 from the previous file.
Version of libsoup: 2.68.3 (Fedora default)