{"id":988640,"date":"2024-12-27T08:04:06","date_gmt":"2024-12-27T00:04:06","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/988640.html"},"modified":"2024-12-27T08:04:08","modified_gmt":"2024-12-27T00:04:08","slug":"python%e5%a6%82%e4%bd%95%e4%bf%9d%e5%ad%98log%e4%bf%a1%e6%81%af","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/988640.html","title":{"rendered":"python\u5982\u4f55\u4fdd\u5b58log\u4fe1\u606f"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25064215\/9f2a7499-d470-457d-b3ae-d6ccca8b5577.webp\" alt=\"python\u5982\u4f55\u4fdd\u5b58log\u4fe1\u606f\" \/><\/p>\n<p><p> <strong>\u8981\u5728Python\u4e2d\u4fdd\u5b58\u65e5\u5fd7\u4fe1\u606f\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684logging\u6a21\u5757\u3001\u901a\u8fc7\u914d\u7f6e\u65e5\u5fd7\u8bb0\u5f55\u5668\u3001\u8bbe\u7f6e\u65e5\u5fd7\u7ea7\u522b\u3001\u683c\u5f0f\u5316\u65e5\u5fd7\u8f93\u51fa\u3001\u5c06\u65e5\u5fd7\u5199\u5165\u6587\u4ef6\u3002<\/strong>Python\u7684logging\u6a21\u5757\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7075\u6d3b\u7684\u6846\u67b6\uff0c\u7528\u4e8e\u5728\u5e94\u7528\u7a0b\u5e8f\u4e2d\u8bb0\u5f55\u65e5\u5fd7\u4fe1\u606f\u3002\u9996\u5148\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u65e5\u5fd7\u8bb0\u5f55\u5668\uff0c\u7136\u540e\u8bbe\u7f6e\u65e5\u5fd7\u7ea7\u522b\uff08\u5982DEBUG\u3001INFO\u3001WARNING\u3001ERROR\u3001CRITICAL\uff09\uff0c\u63a5\u7740\u914d\u7f6e\u65e5\u5fd7\u683c\u5f0f\u548c\u8f93\u51fa\u4f4d\u7f6e\uff08\u5982\u6587\u4ef6\u3001\u63a7\u5236\u53f0\uff09\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u63cf\u8ff0\u5982\u4f55\u4f7f\u7528logging\u6a21\u5757\u4fdd\u5b58\u65e5\u5fd7\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528LOGGING\u6a21\u5757<\/h3>\n<\/p>\n<p><p>Python\u7684logging\u6a21\u5757\u662f\u8bb0\u5f55\u65e5\u5fd7\u7684\u6807\u51c6\u65b9\u5f0f\u3002\u901a\u8fc7\u5b83\uff0c\u60a8\u53ef\u4ee5\u5c06\u65e5\u5fd7\u8f93\u51fa\u5230\u63a7\u5236\u53f0\u3001\u6587\u4ef6\u6216\u5176\u4ed6\u8f93\u51fa\u6d41\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u8bbe\u7f6e\u65e5\u5fd7\u8bb0\u5f55\u5668<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u65e5\u5fd7\u8bb0\u5f55\u5668\u3002\u4f7f\u7528<code>logging.getLogger(name)<\/code>\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u65e5\u5fd7\u8bb0\u5f55\u5668\u6216\u83b7\u53d6\u73b0\u6709\u7684\u8bb0\u5f55\u5668\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import logging<\/p>\n<p>logger = logging.getLogger(&#39;example_logger&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u8bbe\u7f6e\u65e5\u5fd7\u7ea7\u522b<\/h4>\n<\/p>\n<p><p>\u65e5\u5fd7\u7ea7\u522b\u51b3\u5b9a\u4e86\u54ea\u4e9b\u65e5\u5fd7\u4fe1\u606f\u4f1a\u88ab\u8bb0\u5f55\u3002\u5e38\u7528\u7684\u65e5\u5fd7\u7ea7\u522b\u5305\u62ecDEBUG\u3001INFO\u3001WARNING\u3001ERROR\u548cCRITICAL\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">logger.setLevel(logging.DEBUG)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u914d\u7f6e\u65e5\u5fd7\u683c\u5f0f<\/h4>\n<\/p>\n<p><p>\u65e5\u5fd7\u683c\u5f0f\u7528\u4e8e\u5b9a\u4e49\u65e5\u5fd7\u7684\u8f93\u51fa\u683c\u5f0f\u3002\u53ef\u4ee5\u4f7f\u7528<code>logging.Formatter<\/code>\u6765\u8bbe\u7f6e\u683c\u5f0f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">formatter = logging.Formatter(&#39;%(asctime)s - %(name)s - %(levelname)s - %(message)s&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>4\u3001\u6dfb\u52a0\u5904\u7406\u5668<\/h4>\n<\/p>\n<p><p>\u5904\u7406\u5668\uff08Handler\uff09\u7528\u4e8e\u5b9a\u4e49\u65e5\u5fd7\u8f93\u51fa\u7684\u4f4d\u7f6e\uff0c\u4f8b\u5982\u6587\u4ef6\u6216\u63a7\u5236\u53f0\u3002\u5e38\u7528\u7684\u5904\u7406\u5668\u5305\u62ec<code>StreamHandler<\/code>\u548c<code>FileHandler<\/code>\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u8f93\u51fa\u5230\u63a7\u5236\u53f0<\/p>\n<p>console_handler = logging.StreamHandler()<\/p>\n<p>console_handler.setFormatter(formatter)<\/p>\n<p>logger.addHandler(console_handler)<\/p>\n<h2><strong>\u8f93\u51fa\u5230\u6587\u4ef6<\/strong><\/h2>\n<p>file_handler = logging.FileHandler(&#39;example.log&#39;)<\/p>\n<p>file_handler.setFormatter(formatter)<\/p>\n<p>logger.addHandler(file_handler)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>5\u3001\u8bb0\u5f55\u65e5\u5fd7<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528<code>logger.debug()<\/code>\u3001<code>logger.info()<\/code>\u3001<code>logger.warning()<\/code>\u3001<code>logger.error()<\/code>\u548c<code>logger.critical()<\/code>\u7b49\u65b9\u6cd5\u8bb0\u5f55\u65e5\u5fd7\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">logger.debug(&#39;This is a debug message&#39;)<\/p>\n<p>logger.info(&#39;This is an info message&#39;)<\/p>\n<p>logger.warning(&#39;This is a warning message&#39;)<\/p>\n<p>logger.error(&#39;This is an error message&#39;)<\/p>\n<p>logger.critical(&#39;This is a critical message&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u65e5\u5fd7\u914d\u7f6e\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u9664\u4e86\u5728\u4ee3\u7801\u4e2d\u914d\u7f6e\u65e5\u5fd7\u5916\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528\u914d\u7f6e\u6587\u4ef6\u6765\u8bbe\u7f6e\u65e5\u5fd7\u8bb0\u5f55\u5668\u3002\u8fd9\u901a\u5e38\u7528\u4e8e\u5927\u578b\u5e94\u7528\u7a0b\u5e8f\uff0c\u4ee5\u7b80\u5316\u65e5\u5fd7\u914d\u7f6e\u7684\u7ba1\u7406\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u521b\u5efa\u914d\u7f6e\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u521b\u5efa\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\uff08\u5982<code>logging.conf<\/code>\uff09\uff0c\u5e76\u5728\u5176\u4e2d\u5b9a\u4e49\u65e5\u5fd7\u914d\u7f6e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-ini\">[loggers]<\/p>\n<p>keys=root,example_logger<\/p>\n<p>[handlers]<\/p>\n<p>keys=consoleHandler,fileHandler<\/p>\n<p>[formatters]<\/p>\n<p>keys=exampleFormatter<\/p>\n<p>[logger_root]<\/p>\n<p>level=DEBUG<\/p>\n<p>handlers=consoleHandler<\/p>\n<p>[logger_example_logger]<\/p>\n<p>level=DEBUG<\/p>\n<p>handlers=consoleHandler,fileHandler<\/p>\n<p>qualname=example_logger<\/p>\n<p>propagate=0<\/p>\n<p>[handler_consoleHandler]<\/p>\n<p>class=StreamHandler<\/p>\n<p>level=DEBUG<\/p>\n<p>formatter=exampleFormatter<\/p>\n<p>args=(sys.stdout,)<\/p>\n<p>[handler_fileHandler]<\/p>\n<p>class=FileHandler<\/p>\n<p>level=DEBUG<\/p>\n<p>formatter=exampleFormatter<\/p>\n<p>args=(&#39;example.log&#39;, &#39;a&#39;)<\/p>\n<p>[formatter_exampleFormatter]<\/p>\n<p>format=%(asctime)s - %(name)s - %(levelname)s - %(message)s<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u52a0\u8f7d\u914d\u7f6e\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u5728Python\u4ee3\u7801\u4e2d\u4f7f\u7528<code>logging.config.fileConfig()<\/code>\u52a0\u8f7d\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import logging<\/p>\n<p>import logging.config<\/p>\n<p>logging.config.fileConfig(&#39;logging.conf&#39;)<\/p>\n<p>logger = logging.getLogger(&#39;example_logger&#39;)<\/p>\n<p>logger.info(&#39;This is an info message from the configured logger&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001LOGGING\u6700\u4f73\u5b9e\u8df5<\/h3>\n<\/p>\n<p><p>\u5728\u4f7f\u7528Python\u7684logging\u6a21\u5757\u65f6\uff0c\u9075\u5faa\u4e00\u4e9b\u6700\u4f73\u5b9e\u8df5\u53ef\u4ee5\u5e2e\u52a9\u63d0\u9ad8\u65e5\u5fd7\u8bb0\u5f55\u7684\u6548\u679c\u548c\u6548\u7387\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u4f7f\u7528\u4e0d\u540c\u7684\u65e5\u5fd7\u7ea7\u522b<\/h4>\n<\/p>\n<p><p>\u6839\u636e\u65e5\u5fd7\u4fe1\u606f\u7684\u91cd\u8981\u6027\u9009\u62e9\u5408\u9002\u7684\u65e5\u5fd7\u7ea7\u522b\u3002\u4f8b\u5982\uff0c\u8c03\u8bd5\u4fe1\u606f\u4f7f\u7528DEBUG\uff0c\u666e\u901a\u8fd0\u884c\u4fe1\u606f\u4f7f\u7528INFO\uff0c\u8b66\u544a\u4fe1\u606f\u4f7f\u7528WARNING\uff0c\u9519\u8bef\u4fe1\u606f\u4f7f\u7528ERROR\uff0c\u4e25\u91cd\u9519\u8bef\u4f7f\u7528CRITICAL\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u907f\u514d\u65e5\u5fd7\u4fe1\u606f\u91cd\u590d<\/h4>\n<\/p>\n<p><p>\u786e\u4fdd\u6bcf\u4e2a\u65e5\u5fd7\u8bb0\u5f55\u5668\u53ea\u914d\u7f6e\u4e00\u6b21\u5904\u7406\u5668\uff0c\u4ee5\u907f\u514d\u91cd\u590d\u8bb0\u5f55\u65e5\u5fd7\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><h4>3\u3001\u4f7f\u7528\u65e5\u5fd7\u4e0a\u4e0b\u6587\u4fe1\u606f<\/h4>\n<\/p>\n<p><p>\u901a\u8fc7\u5728\u65e5\u5fd7\u6d88\u606f\u4e2d\u6dfb\u52a0\u4e0a\u4e0b\u6587\u4fe1\u606f\uff08\u5982\u51fd\u6570\u540d\u3001\u53d8\u91cf\u503c\u7b49\uff09\uff0c\u53ef\u4ee5\u63d0\u9ad8\u65e5\u5fd7\u7684\u53ef\u8bfb\u6027\u548c\u6709\u7528\u6027\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">logger.info(&#39;Processing item %s in function %s&#39;, item_id, function_name)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>4\u3001\u5b9a\u671f\u8f6e\u6362\u65e5\u5fd7\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528<code>logging.handlers<\/code>\u6a21\u5757\u4e2d\u7684<code>RotatingFileHandler<\/code>\u6216<code>TimedRotatingFileHandler<\/code>\u53ef\u4ee5\u5b9a\u671f\u8f6e\u6362\u65e5\u5fd7\u6587\u4ef6\uff0c\u9632\u6b62\u65e5\u5fd7\u6587\u4ef6\u8fc7\u5927\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from logging.handlers import RotatingFileHandler<\/p>\n<p>rotating_handler = RotatingFileHandler(&#39;example.log&#39;, maxBytes=1024*1024, backupCount=5)<\/p>\n<p>rotating_handler.setFormatter(formatter)<\/p>\n<p>logger.addHandler(rotating_handler)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>5\u3001\u8bb0\u5f55\u5f02\u5e38\u4fe1\u606f<\/h4>\n<\/p>\n<p><p>\u5728\u6355\u83b7\u5f02\u5e38\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>logger.exception()<\/code>\u8bb0\u5f55\u5f02\u5e38\u4fe1\u606f\uff0c\u5305\u62ec\u5806\u6808\u8ddf\u8e2a\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    # code that may r<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>se an exception<\/p>\n<p>    pass<\/p>\n<p>except Exception as e:<\/p>\n<p>    logger.exception(&#39;An error occurred: %s&#39;, e)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5176\u4ed6\u65e5\u5fd7\u5e93<\/h3>\n<\/p>\n<p><p>\u9664\u4e86Python\u5185\u7f6e\u7684logging\u6a21\u5757\uff0c\u8fd8\u6709\u5176\u4ed6\u7b2c\u4e09\u65b9\u65e5\u5fd7\u5e93\u53ef\u4ee5\u7528\u4e8e\u8bb0\u5f55\u65e5\u5fd7\u4fe1\u606f\uff0c\u5982Loguru\u3001structlog\u7b49\u3002<\/p>\n<\/p>\n<p><h4>1\u3001Loguru<\/h4>\n<\/p>\n<p><p>Loguru\u662f\u4e00\u4e2a\u7b80\u5355\u4e14\u529f\u80fd\u5f3a\u5927\u7684\u65e5\u5fd7\u5e93\uff0c\u63d0\u4f9b\u4e86\u66f4\u6613\u7528\u7684API\u548c\u66f4\u591a\u7279\u6027\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from loguru import logger<\/p>\n<p>logger.add(&quot;file.log&quot;, rotation=&quot;1 week&quot;, retention=&quot;10 days&quot;, compression=&quot;zip&quot;)<\/p>\n<p>logger.debug(&quot;This is a debug message&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001structlog<\/h4>\n<\/p>\n<p><p>structlog\u662f\u4e00\u4e2a\u7ed3\u6784\u5316\u65e5\u5fd7\u5e93\uff0c\u7279\u522b\u9002\u5408\u9700\u8981\u8bb0\u5f55\u7ed3\u6784\u5316\u6570\u636e\u7684\u573a\u666f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import structlog<\/p>\n<p>log = structlog.get_logger()<\/p>\n<p>log.msg(&quot;event&quot;, key=&quot;value&quot;, another_key=42)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e86\u89e3\u548c\u5e94\u7528Python\u7684\u65e5\u5fd7\u8bb0\u5f55\u673a\u5236\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u66f4\u597d\u5730\u8bb0\u5f55\u548c\u7ba1\u7406\u5e94\u7528\u7a0b\u5e8f\u7684\u65e5\u5fd7\u4fe1\u606f\uff0c\u4ece\u800c\u63d0\u9ad8\u5e94\u7528\u7a0b\u5e8f\u7684\u53ef\u7ef4\u62a4\u6027\u548c\u8c03\u8bd5\u6548\u7387\u3002\u65e0\u8bba\u662f\u4f7f\u7528\u5185\u7f6e\u7684logging\u6a21\u5757\u8fd8\u662f\u9009\u62e9\u7b2c\u4e09\u65b9\u5e93\uff0c\u5173\u952e\u5728\u4e8e\u7075\u6d3b\u914d\u7f6e\u548c\u4f7f\u7528\u65e5\u5fd7\u8bb0\u5f55\u529f\u80fd\uff0c\u786e\u4fdd\u65e5\u5fd7\u4fe1\u606f\u7684\u5b8c\u6574\u6027\u548c\u53ef\u8bfb\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u8bb0\u5f55\u65e5\u5fd7\u4fe1\u606f\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u8bb0\u5f55\u65e5\u5fd7\u4fe1\u606f\u901a\u5e38\u4f7f\u7528\u5185\u7f6e\u7684<code>logging<\/code>\u6a21\u5757\u3002\u901a\u8fc7\u8bbe\u7f6e\u65e5\u5fd7\u7ea7\u522b\u3001\u683c\u5f0f\u548c\u6587\u4ef6\u8f93\u51fa\u7b49\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u4fdd\u5b58\u65e5\u5fd7\u4fe1\u606f\u3002\u4f7f\u7528<code>logging.basicConfig()<\/code>\u914d\u7f6e\u65e5\u5fd7\u53c2\u6570\uff0c\u7136\u540e\u4f7f\u7528<code>logging.info()<\/code>, <code>logging.error()<\/code>\u7b49\u65b9\u6cd5\u6765\u8bb0\u5f55\u4e0d\u540c\u7ea7\u522b\u7684\u65e5\u5fd7\u3002<\/p>\n<p><strong>\u53ef\u4ee5\u5c06\u65e5\u5fd7\u4fe1\u606f\u4fdd\u5b58\u5230\u54ea\u4e9b\u683c\u5f0f\u7684\u6587\u4ef6\u4e2d\uff1f<\/strong><br \/>Python\u7684<code>logging<\/code>\u6a21\u5757\u53ef\u4ee5\u5c06\u65e5\u5fd7\u4fdd\u5b58\u4e3a\u6587\u672c\u6587\u4ef6\u3001CSV\u6587\u4ef6\uff0c\u751a\u81f3\u53ef\u4ee5\u4f7f\u7528JSON\u683c\u5f0f\u3002\u901a\u8fc7\u6307\u5b9a\u6587\u4ef6\u7684\u6269\u5c55\u540d\u548c\u683c\u5f0f\uff0c\u60a8\u53ef\u4ee5\u7075\u6d3b\u5730\u9009\u62e9\u9002\u5408\u60a8\u9700\u6c42\u7684\u65e5\u5fd7\u5b58\u50a8\u683c\u5f0f\u3002<\/p>\n<p><strong>\u5982\u4f55\u5b9e\u73b0\u65e5\u5fd7\u8f6e\u8f6c\u4ee5\u9632\u6b62\u6587\u4ef6\u8fc7\u5927\uff1f<\/strong><br \/>\u4f7f\u7528<code>logging<\/code>\u6a21\u5757\u4e2d\u7684<code>RotatingFileHandler<\/code>\u6216<code>TimedRotatingFileHandler<\/code>\u53ef\u4ee5\u5b9e\u73b0\u65e5\u5fd7\u8f6e\u8f6c\u3002\u524d\u8005\u6309\u6587\u4ef6\u5927\u5c0f\u8fdb\u884c\u8f6e\u8f6c\uff0c\u540e\u8005\u6309\u65f6\u95f4\u8fdb\u884c\u8f6e\u8f6c\u3002\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u65e5\u5fd7\u6587\u4ef6\u4e0d\u4f1a\u65e0\u9650\u5236\u5730\u589e\u5927\uff0c\u540c\u65f6\u53ef\u4ee5\u4fdd\u7559\u4e00\u5b9a\u6570\u91cf\u7684\u5386\u53f2\u65e5\u5fd7\u6587\u4ef6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5728Python\u4e2d\u4fdd\u5b58\u65e5\u5fd7\u4fe1\u606f\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684logging\u6a21\u5757\u3001\u901a\u8fc7\u914d\u7f6e\u65e5\u5fd7\u8bb0\u5f55\u5668\u3001\u8bbe\u7f6e\u65e5\u5fd7\u7ea7\u522b\u3001\u683c\u5f0f\u5316\u65e5\u5fd7 [&hellip;]","protected":false},"author":3,"featured_media":988648,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/988640"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=988640"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/988640\/revisions"}],"predecessor-version":[{"id":988650,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/988640\/revisions\/988650"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/988648"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=988640"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=988640"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=988640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}