mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
Convert elog(LOG) calls to ereport() where appropriate
User-visible log messages should go through ereport(), so they are subject to translation. Many remaining elog(LOG) calls are really debugging calls. Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org> Reviewed-by: Michael Paquier <michael@paquier.xyz> Reviewed-by: Noah Misch <noah@leadboat.com> Discussion: https://www.postgresql.org/message-id/flat/92d6f545-5102-65d8-3c87-489f71ea0a37%40enterprisedb.com
This commit is contained in:
@@ -1914,7 +1914,9 @@ FileClose(File file)
|
||||
|
||||
/* in any case do the unlink */
|
||||
if (unlink(vfdP->fileName))
|
||||
elog(LOG, "could not unlink file \"%s\": %m", vfdP->fileName);
|
||||
ereport(LOG,
|
||||
(errcode_for_file_access(),
|
||||
errmsg("could not delete file \"%s\": %m", vfdP->fileName)));
|
||||
|
||||
/* and last report the stat results */
|
||||
if (stat_errno == 0)
|
||||
@@ -1922,7 +1924,9 @@ FileClose(File file)
|
||||
else
|
||||
{
|
||||
errno = stat_errno;
|
||||
elog(LOG, "could not stat file \"%s\": %m", vfdP->fileName);
|
||||
ereport(LOG,
|
||||
(errcode_for_file_access(),
|
||||
errmsg("could not stat file \"%s\": %m", vfdP->fileName)));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user