Provide log_status_format(), useful for an emit_log_hook.

Jeff Davis <jdavis@postgresql.org>

Commit: b40baa96a7ad789718dcf59b1dd73bae15c3a7e1
Author: Jeff Davis <jdavis@postgresql.org>
Date: 2022-07-11T19:29:33Z
Releases: 16.0
Provide log_status_format(), useful for an emit_log_hook.

Refactor so that log_line_prefix() is a thin wrapper over a new
function log_status_format(), and move the implementation to the
latter. Export log_status_format() so that it can be used by an
emit_log_hook.

Discussion: https://postgr.es/m/39c8197652f4d3050aedafae79fa5af31096505f.camel%40j-davis.com
Reviewed-by: Michael Paquier, Alvaro Herrera

Files

PathChange+/−
src/backend/utils/error/elog.c modified +12 −3
src/include/utils/elog.h modified +4 −0

Discussion