aboutsummaryrefslogtreecommitdiff
path: root/src/common/logging.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/logging.c')
-rw-r--r--src/common/logging.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/logging.c b/src/common/logging.c
index 2933cab85c8..0b5bcb1a172 100644
--- a/src/common/logging.c
+++ b/src/common/logging.c
@@ -228,6 +228,10 @@ pg_log_generic_v(enum pg_log_level level, enum pg_log_part part,
Assert(fmt);
Assert(fmt[strlen(fmt) - 1] != '\n');
+ /* Do nothing if log level is too low. */
+ if (level < __pg_log_level)
+ return;
+
/*
* Flush stdout before output to stderr, to ensure sync even when stdout
* is buffered.