mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
Add capability to suppress CONTEXT: messages to elog machinery.
Hiding context messages usually is not a good idea - except for rather verbose debugging/development utensils like LOG_DEBUG. There the amount of repeated context messages just bloat the log without adding information.
This commit is contained in:
@ -221,6 +221,7 @@ errcontext_msg(const char *fmt,...)
|
||||
__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
|
||||
|
||||
extern int errhidestmt(bool hide_stmt);
|
||||
extern int errhidecontext(bool hide_ctx);
|
||||
|
||||
extern int errfunction(const char *funcname);
|
||||
extern int errposition(int cursorpos);
|
||||
@ -385,6 +386,7 @@ typedef struct ErrorData
|
||||
bool output_to_client; /* will report to client? */
|
||||
bool show_funcname; /* true to force funcname inclusion */
|
||||
bool hide_stmt; /* true to prevent STATEMENT: inclusion */
|
||||
bool hide_ctx; /* true to prevent CONTEXT: inclusion */
|
||||
const char *filename; /* __FILE__ of ereport() call */
|
||||
int lineno; /* __LINE__ of ereport() call */
|
||||
const char *funcname; /* __func__ of ereport() call */
|
||||
|
Reference in New Issue
Block a user