1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-15 01:04:37 +02:00

Move tls/http statistics output to command/command.

This module already has the filtering required to keep these messages from being displayed by default for commands that output to stdout (e.g. info).
This commit is contained in:
David Steele
2019-05-28 09:50:59 -04:00
parent 3e1b06acaa
commit 3b3327eae6
5 changed files with 23 additions and 24 deletions

View File

@ -7,6 +7,8 @@ Common Command Routines
#include <string.h>
#include "common/debug.h"
#include "common/io/http/client.h"
#include "common/io/tls/client.h"
#include "common/log.h"
#include "common/memContext.h"
#include "common/time.h"
@ -179,6 +181,18 @@ cmdEnd(int code, const String *errorMessage)
{
MEM_CONTEXT_TEMP_BEGIN()
{
// Log tls statistics
String *tlsClientStat = tlsClientStatStr();
if (tlsClientStat != NULL)
LOG_DETAIL(strPtr(tlsClientStat));
// Log http statistics
String *httpClientStat = httpClientStatStr();
if (httpClientStat != NULL)
LOG_INFO(strPtr(httpClientStat));
// Basic info on command end
String *info = strNewFmt("%s command end: ", cfgCommandName(cfgCommand()));