1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-09-16 09:26:30 +02:00

Fix log message redirection

This commit is contained in:
Konstantin Knizhnik
2019-01-24 14:17:32 +03:00
parent 4e3e62b1cf
commit ab94800fab

View File

@@ -85,7 +85,7 @@ static void print_message(char const* buf)
char const* const severity[] = {"VERBOSE", "LOG", "INFO", "NOTICE", "WARNING", "FATAL", "ERROR", ""};
size_t i;
for (i = 0; strncmp(buf, severity[i], strlen(severity[i])) != 0; i++);
elog(i+VERBOSE, "%s", buf + strlen(severity[i]) + 2);
elog(i+VERBOSE > ERROR ? LOG : i + VERBOSE, "%s", buf + strlen(severity[i]) + 2);
}
static void* error_reader_proc(void* arg)