summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2013-08-13 19:24:56 +0000
committerTom Lane2013-08-13 19:24:56 +0000
commit6d8186ff779fd46f0251eb252e7489fd38ab793b (patch)
treec093ba3eca212d154f15bdaba605ba55a1ba07b4 /src/include
parent7cf5540c831460476d24566845422b8c81bd6581 (diff)
Emit a log message if output is about to be redirected away from stderr.
We've seen multiple cases of people looking at the postmaster's original stderr output to try to diagnose problems, not realizing/remembering that their logging configuration is set up to send log messages somewhere else. This seems particularly likely to happen in prepackaged distributions, since many packagers patch the code to change the factory-standard logging configuration to something more in line with their platform conventions. In hopes of reducing confusion, emit a LOG message about this at the point in startup where we are about to switch log output away from the original stderr, providing a pointer to where to look instead. This message will appear as the last thing in the original stderr output. (We might later also try to emit such link messages when logging parameters are changed on-the-fly; but that case seems to be both noticeably harder to do nicely, and much less frequently a problem in practice.) Per discussion, back-patch to 9.3 but not further.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/utils/elog.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h
index 85bd2fdf8a2..76f6367840d 100644
--- a/src/include/utils/elog.h
+++ b/src/include/utils/elog.h
@@ -423,6 +423,7 @@ typedef enum
extern int Log_error_verbosity;
extern char *Log_line_prefix;
extern int Log_destination;
+extern char *Log_destination_string;
/* Log destination bitmap */
#define LOG_DESTINATION_STDERR 1