{"Entry":{"collection":"func","key":"pg-current-logfile","name":"pg_current_logfile","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"9.6","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"10"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"},{"descriptions_changed":true,"doc_overhaul":false,"from":"14","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"15"}],"content_hash":"f924c1c050b1391b2f60eb7756f5089c7c1d0065ebec51c85fcd3991cf0a7287","derived_content_hash":"fe2ac5e3b63c99d74e2b842752e0c804cc38cad174b2a95dd6f385f6b66bc756","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:c59a6aec7fa1c76fe9a3b0ac7abbb7c5594aaa42860d23c9914b81393504edd0","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"10","group":"info","group_label":"System Information Functions And Operators","groups":["info"],"imported_at":"2026-09-27T17:57:29.142289+08:00","last_version":"20","name":"pg_current_logfile","name_key":"pg_current_logfile","position":28045,"present_in":["10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"b7bd9cda","receipt_sha256":"e9d77dc08fc3631e2e00137f6b04130eb8e82f707ea364c54dd82ccc60462bef","repair":"wiki-repair-20261023"},"signature":"pg_current_logfile ( [ text ] ) → text","signature_count":1,"slug":"pg-current-logfile","source_rev":"wiki-repair-20261023:c59a6aec7fa1c76fe9a3b0ac7abbb7c5594aaa42860d23c9914b81393504edd0","summary":"Returns the path name of the log file currently in use by the logging collector.","summary_zh":""}},"Definition":{"Collection":"func","Key":"pg-current-logfile","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"pg-current-logfile","SourceRevision":"wiki-repair-20261023:c59a6aec7fa1c76fe9a3b0ac7abbb7c5594aaa42860d23c9914b81393504edd0","Facts":{"description":"Returns the path name of the log file currently in use by the logging collector. The path includes the log_directory directory and the individual log file name. The result is NULL if the logging collector is disabled. When multiple log files exist, each in a different format, pg_current_logfile without an argument returns the path of the file having the first format found in the ordered list: stderr, csvlog, jsonlog. NULL is returned if no log file has any of these formats. To request information about a specific log file format, supply either csvlog, jsonlog or stderr as the value of the optional parameter. The result is NULL if the log format requested is not configured in log_destination. The result reflects the contents of the current_logfiles file.","description_html":"Returns the path name of the log file currently in use by the logging collector. The path includes the \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DIRECTORY\"\u003elog_directory\u003c/a\u003e directory and the individual log file name. The result is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if the logging collector is disabled. When multiple log files exist, each in a different format, \u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e without an argument returns the path of the file having the first format found in the ordered list: \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e, \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e, \u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e. \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e is returned if no log file has any of these formats. To request information about a specific log file format, supply either \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e, \u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e or \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e as the value of the optional parameter. The result is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if the log format requested is not configured in \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DESTINATION\"\u003elog_destination\u003c/a\u003e. The result reflects the contents of the \u003ccode class=\"filename\"\u003ecurrent_logfiles\u003c/code\u003e file.","description_zh":"返回当前由日志收集器使用的日志文件的路径名。路径包括 log_directory 目录和单独的日志文件名。如果日志收集器已禁用，则结果为 NULL。当存在多个日志文件，每个以不同格式存在时，不带参数的 pg_current_logfile 返回有序列表中找到的第一个格式的文件路径：stderr，csvlog，jsonlog。如果没有任何日志文件具有这些格式，则返回 NULL。要请求有关特定日志文件格式的信息，请将 csvlog，jsonlog 或 stderr 作为可选参数的值。如果请求的日志格式未在 log_destination 中配置，则结果为 NULL。结果反映 current_logfiles 文件的内容。","description_zh_html":"返回当前由日志收集器使用的日志文件的路径名。路径包括 \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DIRECTORY\"\u003elog_directory\u003c/a\u003e 目录和单独的日志文件名。如果日志收集器已禁用，则结果为 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。当存在多个日志文件，每个以不同格式存在时，不带参数的 \u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e 返回有序列表中找到的第一个格式的文件路径：\u003ccode class=\"literal\"\u003estderr\u003c/code\u003e，\u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e，\u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e。如果没有任何日志文件具有这些格式，则返回 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。要请求有关特定日志文件格式的信息，请将 \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e，\u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e 或 \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e 作为可选参数的值。如果请求的日志格式未在 \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DESTINATION\"\u003elog_destination\u003c/a\u003e 中配置，则结果为 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。结果反映 \u003ccode class=\"filename\"\u003ecurrent_logfiles\u003c/code\u003e 文件的内容。","doc":{"anchor":"FUNCTIONS-INFO-SESSION-TABLE","file":"functions-info.html","sha256":"64499116227a087138bb14f29ff6652b200a176d5df3ce2a089c3d5c226b19b3","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-info.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"64499116227a087138bb14f29ff6652b200a176d5df3ce2a089c3d5c226b19b3","version":"18.7"},{"file":"functions-info.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"f9684137c0b9fb17a691c4d905529d114472a507a007c15058f2703962b611d2","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"info","group_label":"系统信息函数和操作符","lang":"en","layout":"table-new","pages":["functions-info.html"],"prose_only":false,"signatures":[{"description":"Returns the path name of the log file currently in use by the logging collector. The path includes the log_directory directory and the individual log file name. The result is NULL if the logging collector is disabled. When multiple log files exist, each in a different format, pg_current_logfile without an argument returns the path of the file having the first format found in the ordered list: stderr, csvlog, jsonlog. NULL is returned if no log file has any of these formats. To request information about a specific log file format, supply either csvlog, jsonlog or stderr as the value of the optional parameter. The result is NULL if the log format requested is not configured in log_destination. The result reflects the contents of the current_logfiles file.","description_html":"Returns the path name of the log file currently in use by the logging collector. The path includes the \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DIRECTORY\"\u003elog_directory\u003c/a\u003e directory and the individual log file name. The result is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if the logging collector is disabled. When multiple log files exist, each in a different format, \u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e without an argument returns the path of the file having the first format found in the ordered list: \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e, \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e, \u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e. \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e is returned if no log file has any of these formats. To request information about a specific log file format, supply either \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e, \u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e or \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e as the value of the optional parameter. The result is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if the log format requested is not configured in \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DESTINATION\"\u003elog_destination\u003c/a\u003e. The result reflects the contents of the \u003ccode class=\"filename\"\u003ecurrent_logfiles\u003c/code\u003e file.","description_zh":"返回当前由日志收集器使用的日志文件的路径名。路径包括 log_directory 目录和单独的日志文件名。如果日志收集器已禁用，则结果为 NULL。当存在多个日志文件，每个以不同格式存在时，不带参数的 pg_current_logfile 返回有序列表中找到的第一个格式的文件路径：stderr，csvlog，jsonlog。如果没有任何日志文件具有这些格式，则返回 NULL。要请求有关特定日志文件格式的信息，请将 csvlog，jsonlog 或 stderr 作为可选参数的值。如果请求的日志格式未在 log_destination 中配置，则结果为 NULL。结果反映 current_logfiles 文件的内容。","description_zh_html":"返回当前由日志收集器使用的日志文件的路径名。路径包括 \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DIRECTORY\"\u003elog_directory\u003c/a\u003e 目录和单独的日志文件名。如果日志收集器已禁用，则结果为 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。当存在多个日志文件，每个以不同格式存在时，不带参数的 \u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e 返回有序列表中找到的第一个格式的文件路径：\u003ccode class=\"literal\"\u003estderr\u003c/code\u003e，\u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e，\u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e。如果没有任何日志文件具有这些格式，则返回 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。要请求有关特定日志文件格式的信息，请将 \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e，\u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e 或 \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e 作为可选参数的值。如果请求的日志格式未在 \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DESTINATION\"\u003elog_destination\u003c/a\u003e 中配置，则结果为 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。结果反映 \u003ccode class=\"filename\"\u003ecurrent_logfiles\u003c/code\u003e 文件的内容。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e ( [\u003cspan class=\"optional\"\u003e\u003ccode class=\"type\"\u003etext\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"pg_current_logfile ( [text] ) → text","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-info.html","sha256":"7c33185e79430cfbda432dc4db277115c7ac846afccadfcf904ceb1bf2aa1ba5"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-INFO-SESSION-TABLE","file":"functions-info.html","sha256":"64499116227a087138bb14f29ff6652b200a176d5df3ce2a089c3d5c226b19b3","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"pg-current-logfile","SourceDatabase":"center","Version":"18","Locale":"en","Title":"pg_current_logfile","Summary":"Returns the path name of the log file currently in use by the logging collector. The path includes the log_directory directory and the individual log file name. The result is NULL if the logging collector is disabled. When multiple log files exist, each in a different format, pg_current_logfile without an argument returns the path of the file having the first format found in the ordered list: stderr, csvlog, jsonlog. NULL is returned if no log file has any of these formats. To request information about a specific log file format, supply either csvlog, jsonlog or stderr as the value of the optional parameter. The result is NULL if the log format requested is not configured in log_destination. The result reflects the contents of the current_logfiles file.","BodyHTML":"Returns the path name of the log file currently in use by the logging collector. The path includes the \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DIRECTORY\" rel=\"nofollow\"\u003elog_directory\u003c/a\u003e directory and the individual log file name. The result is \u003ccode\u003eNULL\u003c/code\u003e if the logging collector is disabled. When multiple log files exist, each in a different format, \u003ccode\u003epg_current_logfile\u003c/code\u003e without an argument returns the path of the file having the first format found in the ordered list: \u003ccode\u003estderr\u003c/code\u003e, \u003ccode\u003ecsvlog\u003c/code\u003e, \u003ccode\u003ejsonlog\u003c/code\u003e. \u003ccode\u003eNULL\u003c/code\u003e is returned if no log file has any of these formats. To request information about a specific log file format, supply either \u003ccode\u003ecsvlog\u003c/code\u003e, \u003ccode\u003ejsonlog\u003c/code\u003e or \u003ccode\u003estderr\u003c/code\u003e as the value of the optional parameter. The result is \u003ccode\u003eNULL\u003c/code\u003e if the log format requested is not configured in \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DESTINATION\" rel=\"nofollow\"\u003elog_destination\u003c/a\u003e. The result reflects the contents of the \u003ccode\u003ecurrent_logfiles\u003c/code\u003e file.","SourceRevision":"wiki-repair-20261023:c59a6aec7fa1c76fe9a3b0ac7abbb7c5594aaa42860d23c9914b81393504edd0","ContentHash":"5e8bf5859c45b90a55d2e1c84e6abb209531b0115c491fa7df0dd0ddadc096ef","Payload":{"description":"Returns the path name of the log file currently in use by the logging collector. The path includes the log_directory directory and the individual log file name. The result is NULL if the logging collector is disabled. When multiple log files exist, each in a different format, pg_current_logfile without an argument returns the path of the file having the first format found in the ordered list: stderr, csvlog, jsonlog. NULL is returned if no log file has any of these formats. To request information about a specific log file format, supply either csvlog, jsonlog or stderr as the value of the optional parameter. The result is NULL if the log format requested is not configured in log_destination. The result reflects the contents of the current_logfiles file.","description_html":"Returns the path name of the log file currently in use by the logging collector. The path includes the \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DIRECTORY\"\u003elog_directory\u003c/a\u003e directory and the individual log file name. The result is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if the logging collector is disabled. When multiple log files exist, each in a different format, \u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e without an argument returns the path of the file having the first format found in the ordered list: \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e, \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e, \u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e. \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e is returned if no log file has any of these formats. To request information about a specific log file format, supply either \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e, \u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e or \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e as the value of the optional parameter. The result is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if the log format requested is not configured in \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DESTINATION\"\u003elog_destination\u003c/a\u003e. The result reflects the contents of the \u003ccode class=\"filename\"\u003ecurrent_logfiles\u003c/code\u003e file.","signatures":[{"description":"Returns the path name of the log file currently in use by the logging collector. The path includes the log_directory directory and the individual log file name. The result is NULL if the logging collector is disabled. When multiple log files exist, each in a different format, pg_current_logfile without an argument returns the path of the file having the first format found in the ordered list: stderr, csvlog, jsonlog. NULL is returned if no log file has any of these formats. To request information about a specific log file format, supply either csvlog, jsonlog or stderr as the value of the optional parameter. The result is NULL if the log format requested is not configured in log_destination. The result reflects the contents of the current_logfiles file.","description_html":"Returns the path name of the log file currently in use by the logging collector. The path includes the \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DIRECTORY\"\u003elog_directory\u003c/a\u003e directory and the individual log file name. The result is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if the logging collector is disabled. When multiple log files exist, each in a different format, \u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e without an argument returns the path of the file having the first format found in the ordered list: \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e, \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e, \u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e. \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e is returned if no log file has any of these formats. To request information about a specific log file format, supply either \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e, \u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e or \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e as the value of the optional parameter. The result is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if the log format requested is not configured in \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DESTINATION\"\u003elog_destination\u003c/a\u003e. The result reflects the contents of the \u003ccode class=\"filename\"\u003ecurrent_logfiles\u003c/code\u003e file.","description_zh":"返回当前由日志收集器使用的日志文件的路径名。路径包括 log_directory 目录和单独的日志文件名。如果日志收集器已禁用，则结果为 NULL。当存在多个日志文件，每个以不同格式存在时，不带参数的 pg_current_logfile 返回有序列表中找到的第一个格式的文件路径：stderr，csvlog，jsonlog。如果没有任何日志文件具有这些格式，则返回 NULL。要请求有关特定日志文件格式的信息，请将 csvlog，jsonlog 或 stderr 作为可选参数的值。如果请求的日志格式未在 log_destination 中配置，则结果为 NULL。结果反映 current_logfiles 文件的内容。","description_zh_html":"返回当前由日志收集器使用的日志文件的路径名。路径包括 \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DIRECTORY\"\u003elog_directory\u003c/a\u003e 目录和单独的日志文件名。如果日志收集器已禁用，则结果为 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。当存在多个日志文件，每个以不同格式存在时，不带参数的 \u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e 返回有序列表中找到的第一个格式的文件路径：\u003ccode class=\"literal\"\u003estderr\u003c/code\u003e，\u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e，\u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e。如果没有任何日志文件具有这些格式，则返回 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。要请求有关特定日志文件格式的信息，请将 \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e，\u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e 或 \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e 作为可选参数的值。如果请求的日志格式未在 \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DESTINATION\"\u003elog_destination\u003c/a\u003e 中配置，则结果为 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。结果反映 \u003ccode class=\"filename\"\u003ecurrent_logfiles\u003c/code\u003e 文件的内容。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e ( [\u003cspan class=\"optional\"\u003e\u003ccode class=\"type\"\u003etext\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"pg_current_logfile ( [text] ) → text","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"7d130b9ea6004f1e16dd3b864f1def75fb8816582a7e6cfdd46161c60ab43dff","Text":"pg_current_logfile ( [text] ) → text","Returns":"text","Payload":{"description":"Returns the path name of the log file currently in use by the logging collector. The path includes the log_directory directory and the individual log file name. The result is NULL if the logging collector is disabled. When multiple log files exist, each in a different format, pg_current_logfile without an argument returns the path of the file having the first format found in the ordered list: stderr, csvlog, jsonlog. NULL is returned if no log file has any of these formats. To request information about a specific log file format, supply either csvlog, jsonlog or stderr as the value of the optional parameter. The result is NULL if the log format requested is not configured in log_destination. The result reflects the contents of the current_logfiles file.","description_html":"Returns the path name of the log file currently in use by the logging collector. The path includes the \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DIRECTORY\"\u003elog_directory\u003c/a\u003e directory and the individual log file name. The result is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if the logging collector is disabled. When multiple log files exist, each in a different format, \u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e without an argument returns the path of the file having the first format found in the ordered list: \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e, \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e, \u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e. \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e is returned if no log file has any of these formats. To request information about a specific log file format, supply either \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e, \u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e or \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e as the value of the optional parameter. The result is \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if the log format requested is not configured in \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DESTINATION\"\u003elog_destination\u003c/a\u003e. The result reflects the contents of the \u003ccode class=\"filename\"\u003ecurrent_logfiles\u003c/code\u003e file.","description_zh":"返回当前由日志收集器使用的日志文件的路径名。路径包括 log_directory 目录和单独的日志文件名。如果日志收集器已禁用，则结果为 NULL。当存在多个日志文件，每个以不同格式存在时，不带参数的 pg_current_logfile 返回有序列表中找到的第一个格式的文件路径：stderr，csvlog，jsonlog。如果没有任何日志文件具有这些格式，则返回 NULL。要请求有关特定日志文件格式的信息，请将 csvlog，jsonlog 或 stderr 作为可选参数的值。如果请求的日志格式未在 log_destination 中配置，则结果为 NULL。结果反映 current_logfiles 文件的内容。","description_zh_html":"返回当前由日志收集器使用的日志文件的路径名。路径包括 \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DIRECTORY\"\u003elog_directory\u003c/a\u003e 目录和单独的日志文件名。如果日志收集器已禁用，则结果为 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。当存在多个日志文件，每个以不同格式存在时，不带参数的 \u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e 返回有序列表中找到的第一个格式的文件路径：\u003ccode class=\"literal\"\u003estderr\u003c/code\u003e，\u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e，\u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e。如果没有任何日志文件具有这些格式，则返回 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。要请求有关特定日志文件格式的信息，请将 \u003ccode class=\"literal\"\u003ecsvlog\u003c/code\u003e，\u003ccode class=\"literal\"\u003ejsonlog\u003c/code\u003e 或 \u003ccode class=\"literal\"\u003estderr\u003c/code\u003e 作为可选参数的值。如果请求的日志格式未在 \u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-DESTINATION\"\u003elog_destination\u003c/a\u003e 中配置，则结果为 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。结果反映 \u003ccode class=\"filename\"\u003ecurrent_logfiles\u003c/code\u003e 文件的内容。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_current_logfile\u003c/code\u003e ( [\u003cspan class=\"optional\"\u003e\u003ccode class=\"type\"\u003etext\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"pg_current_logfile ( [text] ) → text","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
