mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-06-20 01:17:49 +02:00
Reduce variables extern'd by the common/log module in debug builds.
These days it is better to include the module in define.yaml when we need to poke at the internal implementation. This doesn't quite work for the log test harness, so for now some variables will need to remain extern'd in debug builds.
This commit is contained in:
+9
-9
@@ -21,27 +21,27 @@ Log Handler
|
|||||||
Module variables
|
Module variables
|
||||||
***********************************************************************************************************************************/
|
***********************************************************************************************************************************/
|
||||||
// Log levels
|
// Log levels
|
||||||
DEBUG_UNIT_EXTERN LogLevel logLevelStdOut = logLevelError;
|
static LogLevel logLevelStdOut = logLevelError;
|
||||||
DEBUG_UNIT_EXTERN LogLevel logLevelStdErr = logLevelError;
|
static LogLevel logLevelStdErr = logLevelError;
|
||||||
DEBUG_UNIT_EXTERN LogLevel logLevelFile = logLevelOff;
|
static LogLevel logLevelFile = logLevelOff;
|
||||||
DEBUG_UNIT_EXTERN LogLevel logLevelAny = logLevelError;
|
static LogLevel logLevelAny = logLevelError;
|
||||||
|
|
||||||
// Log file handles
|
// Log file handles
|
||||||
DEBUG_UNIT_EXTERN int logHandleStdOut = STDOUT_FILENO;
|
static int logHandleStdOut = STDOUT_FILENO;
|
||||||
DEBUG_UNIT_EXTERN int logHandleStdErr = STDERR_FILENO;
|
static int logHandleStdErr = STDERR_FILENO;
|
||||||
DEBUG_UNIT_EXTERN int logHandleFile = -1;
|
DEBUG_UNIT_EXTERN int logHandleFile = -1;
|
||||||
|
|
||||||
// Has the log file banner been written yet?
|
// Has the log file banner been written yet?
|
||||||
DEBUG_UNIT_EXTERN bool logFileBanner = false;
|
DEBUG_UNIT_EXTERN bool logFileBanner = false;
|
||||||
|
|
||||||
// Is the timestamp printed in the log?
|
// Is the timestamp printed in the log?
|
||||||
DEBUG_UNIT_EXTERN bool logTimestamp = false;
|
static bool logTimestamp = false;
|
||||||
|
|
||||||
// Size of the process id field
|
// Size of the process id field
|
||||||
DEBUG_UNIT_EXTERN int logProcessSize = 2;
|
static int logProcessSize = 2;
|
||||||
|
|
||||||
// Prefix DRY-RUN to log messages
|
// Prefix DRY-RUN to log messages
|
||||||
DEBUG_UNIT_EXTERN bool logDryRun = false;
|
static bool logDryRun = false;
|
||||||
|
|
||||||
/***********************************************************************************************************************************
|
/***********************************************************************************************************************************
|
||||||
Dry run prefix
|
Dry run prefix
|
||||||
|
|||||||
@@ -354,6 +354,9 @@ unit:
|
|||||||
config/parse: full
|
config/parse: full
|
||||||
config/parse.auto: noCode
|
config/parse.auto: noCode
|
||||||
|
|
||||||
|
include:
|
||||||
|
- common/log
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------------------------------------------------
|
||||||
- name: load
|
- name: load
|
||||||
total: 4
|
total: 4
|
||||||
@@ -361,6 +364,9 @@ unit:
|
|||||||
coverage:
|
coverage:
|
||||||
config/load: full
|
config/load: full
|
||||||
|
|
||||||
|
include:
|
||||||
|
- common/log
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------------------------------------------------
|
||||||
- name: exec
|
- name: exec
|
||||||
total: 1
|
total: 1
|
||||||
|
|||||||
@@ -8,14 +8,6 @@ Test Configuration Load
|
|||||||
|
|
||||||
#include "common/harnessConfig.h"
|
#include "common/harnessConfig.h"
|
||||||
|
|
||||||
/***********************************************************************************************************************************
|
|
||||||
Expose log internal data for unit testing/debugging
|
|
||||||
***********************************************************************************************************************************/
|
|
||||||
extern LogLevel logLevelStdOut;
|
|
||||||
extern LogLevel logLevelStdErr;
|
|
||||||
extern LogLevel logLevelFile;
|
|
||||||
extern bool logTimestamp;
|
|
||||||
|
|
||||||
/***********************************************************************************************************************************
|
/***********************************************************************************************************************************
|
||||||
Test run
|
Test run
|
||||||
***********************************************************************************************************************************/
|
***********************************************************************************************************************************/
|
||||||
|
|||||||
@@ -12,12 +12,6 @@ Test Configuration Parse
|
|||||||
#define TEST_COMMAND_RESTORE "restore"
|
#define TEST_COMMAND_RESTORE "restore"
|
||||||
#define TEST_COMMAND_VERSION "version"
|
#define TEST_COMMAND_VERSION "version"
|
||||||
|
|
||||||
/***********************************************************************************************************************************
|
|
||||||
Expose log internal data for unit testing/debugging
|
|
||||||
***********************************************************************************************************************************/
|
|
||||||
extern LogLevel logLevelStdOut;
|
|
||||||
extern LogLevel logLevelStdErr;
|
|
||||||
|
|
||||||
/***********************************************************************************************************************************
|
/***********************************************************************************************************************************
|
||||||
Option find test -- this is done a lot in the deprecated tests
|
Option find test -- this is done a lot in the deprecated tests
|
||||||
***********************************************************************************************************************************/
|
***********************************************************************************************************************************/
|
||||||
|
|||||||
Reference in New Issue
Block a user