Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ab94800

Browse files
committed
Fix log message redirection
1 parent 4e3e62b commit ab94800

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/remote.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static void print_message(char const* buf)
8585
char const* const severity[] = {"VERBOSE", "LOG", "INFO", "NOTICE", "WARNING", "FATAL", "ERROR", ""};
8686
size_t i;
8787
for (i = 0; strncmp(buf, severity[i], strlen(severity[i])) != 0; i++);
88-
elog(i+VERBOSE, "%s", buf + strlen(severity[i]) + 2);
88+
elog(i+VERBOSE > ERROR ? LOG : i + VERBOSE, "%s", buf + strlen(severity[i]) + 2);
8989
}
9090

9191
static void* error_reader_proc(void* arg)

0 commit comments

Comments
 (0)