PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/xact.h"
#include "libpq/libpq-be.h"
#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "postmaster/syslogger.h"
#include "storage/lock.h"
#include "storage/proc.h"
#include "tcop/tcopprot.h"
#include "utils/backend_status.h"
#include "utils/guc.h"
#include "utils/json.h"
#include "utils/ps_status.h"
Go to the source code of this file.
Functions | |
static void | appendJSONKeyValueFmt (StringInfo buf, const char *key, bool escape_key, const char *fmt,...) pg_attribute_printf(4 |
static void static void | appendJSONKeyValue (StringInfo buf, const char *key, const char *value, bool escape_value) |
void | write_jsonlog (ErrorData *edata) |
|
static |
Definition at line 43 of file jsonlog.c.
References appendStringInfoChar(), appendStringInfoString(), Assert, buf, escape_json(), sort-test::key, and value.
Referenced by appendJSONKeyValueFmt(), and write_jsonlog().
|
static |
Definition at line 70 of file jsonlog.c.
References appendJSONKeyValue(), generate_unaccent_rules::args, buf, fmt, sort-test::key, len, palloc(), pfree(), pvsnprintf(), va_end(), va_start(), and value.
Referenced by write_jsonlog().
void write_jsonlog | ( | ErrorData * | edata | ) |
Definition at line 109 of file jsonlog.c.
References appendBinaryStringInfo(), appendJSONKeyValue(), appendJSONKeyValueFmt(), appendStringInfoChar(), application_name, B_LOGGER, buf, check_log_of_query(), ErrorData::context, ErrorData::cursorpos, StringInfoData::data, Port::database_name, debug_query_string, ErrorData::detail, ErrorData::detail_log, ErrorData::elevel, error_severity(), escape_json(), ErrorData::filename, ErrorData::funcname, get_backend_type_for_log(), get_formatted_log_time(), get_formatted_start_time(), get_ps_display(), GetTopTransactionIdIfAny(), ErrorData::hide_ctx, ErrorData::hint, initStringInfo(), ErrorData::internalpos, ErrorData::internalquery, INVALID_PROC_NUMBER, ErrorData::lineno, PGPROC::lockGroupLeader, LOG_DESTINATION_JSONLOG, Log_error_verbosity, PGPROC::lxid, ErrorData::message, MyBackendType, MyProc, MyProcPid, MyProcPort, MyStartTime, pfree(), PGERROR_VERBOSE, pgstat_get_my_query_id(), PGPROC::pid, PGPROC::procNumber, Port::remote_host, Port::remote_port, reset_formatted_start_time(), ErrorData::sqlerrcode, start_time, unpack_sql_state(), Port::user_name, PGPROC::vxid, write_pipe_chunks(), and write_syslogger_file().
Referenced by send_message_to_server_log().