MCPcopy Create free account
hub / github.com/apache/cloudberry / error_severity

Function error_severity

src/backend/utils/error/elog.c:4905–4948  ·  view source on GitHub ↗

* error_severity --- get string representing elevel * * The string is not localized here, but we mark the strings for translation * so that callers can invoke _() on the result. */

Source from the content-addressed store, hash-verified

4903 * so that callers can invoke _() on the result.
4904 */
4905static const char *
4906error_severity(int elevel)
4907{
4908 const char *prefix;
4909
4910 switch (elevel)
4911 {
4912 case DEBUG1:
4913 case DEBUG2:
4914 case DEBUG3:
4915 case DEBUG4:
4916 case DEBUG5:
4917 prefix = gettext_noop("DEBUG");
4918 break;
4919 case LOG:
4920 case LOG_SERVER_ONLY:
4921 prefix = gettext_noop("LOG");
4922 break;
4923 case INFO:
4924 prefix = gettext_noop("INFO");
4925 break;
4926 case NOTICE:
4927 prefix = gettext_noop("NOTICE");
4928 break;
4929 case WARNING:
4930 case WARNING_CLIENT_ONLY:
4931 prefix = gettext_noop("WARNING");
4932 break;
4933 case ERROR:
4934 prefix = gettext_noop("ERROR");
4935 break;
4936 case FATAL:
4937 prefix = gettext_noop("FATAL");
4938 break;
4939 case PANIC:
4940 prefix = gettext_noop("PANIC");
4941 break;
4942 default:
4943 prefix = "???";
4944 break;
4945 }
4946
4947 return prefix;
4948}
4949
4950
4951/*

Callers 5

write_csvlogFunction · 0.70
write_syslogger_in_csvFunction · 0.70
send_message_to_frontendFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected