{"id":4944,"date":"2024-10-05T12:01:01","date_gmt":"2024-10-05T04:01:01","guid":{"rendered":""},"modified":"2024-10-05T12:01:01","modified_gmt":"2024-10-05T04:01:01","slug":"go\u7b2c\u4e09\u65b9\u65e5\u5fd7\u5e93uber-go\/zap\u3001lumberjack","status":"publish","type":"post","link":"https:\/\/mushiming.com\/4944.html","title":{"rendered":"go\u7b2c\u4e09\u65b9\u65e5\u5fd7\u5e93uber-go\/zap\u3001lumberjack"},"content":{"rendered":"

\n <\/path> \n<\/svg> <\/p>\n

uber-go\/zap\u3001lumberjack<\/h2>\n

zap\u662fuber\u5f00\u6e90\u7684go\u8bed\u8a00\u9ad8\u6027\u80fd\u65e5\u5fd7\u5e93\uff0c
lumberjack\u662fzap\u5b98\u65b9\u63a8\u8350\u7684\u65e5\u5fd7\u5206\u5272\u5e93\uff0c
\u7ed3\u5408\u8fd9\u4e24\u4e2a\u5e93\u6211\u4eec\u53ef\u4ee5\u5728\u9879\u76ee\u4e2d\u5b9e\u73b0\u5b8c\u6574\u7684\u65e5\u5fd7\u673a\u5236\uff0c
\u4f8b\u5982\uff1a\u8f93\u51fa\u65e5\u5fd7\u5230\u6587\u4ef6\u3001\u6839\u636e\u6587\u4ef6\u5927\u5c0f\u6216\u65e5\u671f\u5206\u5272\u7b49\u3002<\/p>\n

uber-go\/zap<\/h3>\n

\u5b89\u88c5<\/h4>\n

\u5728\u9879\u76ee\u76ee\u5f55\u4e0b\u547d\u4ee4\u884c\u6267\u884c<\/p>\n

go get -<\/span>u go.<\/span>uber.<\/span>org\/<\/span>zap <\/code><\/pre>\n

\"go\u7b2c\u4e09\u65b9\u65e5\u5fd7\u5e93uber-go\/zap\u3001lumberjack<\/p>\n

Logger<\/h4>\n

\u901a\u8fc7zap.NewDevelopment()\u6216zap.NewProduction()\u90fd\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2aLogger\uff0c
\u5b83\u4eec\u7684\u4e3b\u8981\u533a\u522b\u5728\u4e8eNewDevelopment\u4f1a\u8f93\u51fa\u65f6\u95f4\u548c\u5305\/\u6587\u4ef6\/\u4ee3\u7801\u884c\u4fe1\u606f\uff0c
\u800cNewProduction\u4e0d\u4f1a\uff0c\u5e76\u4e14NewProduction\u4e0d\u8bb0\u5f55debug\u65e5\u5fd7\uff0c
\u6211\u4eec\u770b\u4e00\u4e0b\u4f8b\u5b50\uff1a<\/p>\n

zap.NewDevelopment()<\/h5>\n
package<\/span> main import<\/span> \"go.uber.org\/zap\"<\/span> func<\/span> main<\/span>(<\/span>)<\/span> { \n   <\/span> log,<\/span> _<\/span> :=<\/span> zap.<\/span>NewDevelopment<\/span>(<\/span>)<\/span> log.<\/span>Debug<\/span>(<\/span>\"\u8fd9\u662fdebug\u65e5\u5fd7\"<\/span>)<\/span> log.<\/span>Info<\/span>(<\/span>\"***************************\"<\/span>)<\/span> log.<\/span>Info<\/span>(<\/span>\"\u8fd9\u662finfo\u65e5\u5fd7\"<\/span>)<\/span> log.<\/span>Info<\/span>(<\/span>\"***************************\"<\/span>)<\/span> log.<\/span>Warn<\/span>(<\/span>\"\u8fd9\u662fwarn\u65e5\u5fd7\"<\/span>)<\/span> log.<\/span>Info<\/span>(<\/span>\"***************************\"<\/span>)<\/span> log.<\/span>Error<\/span>(<\/span>\"\u8fd9\u662ferror\u65e5\u5fd7\"<\/span>)<\/span> log.<\/span>Info<\/span>(<\/span>\"***************************\"<\/span>)<\/span> log.<\/span>Panic<\/span>(<\/span>\"\u8fd9\u662fpanic\u65e5\u5fd7\"<\/span>)<\/span> }<\/span> <\/code><\/pre>\n

\u8f93\u51fa<\/p>\n

GOROOT=<\/span>D:\\Program Files\\Go #gosetup<\/span> GOPATH=<\/span>D:\\work\\goWorkspace;<\/span>D:\\work\\goPath #gosetup<\/span> \"D:\\Program Files\\Go\\bin\\go.exe\"<\/span> build -o C:\\Users\\smart\\AppData\\Local\\Temp\\___go_build_main_go__1_.exe D:\/work\/goWorkspace\/src\/helloGoMod\/log\/main.go #gosetup<\/span> C:\\Users\\smart\\AppData\\Local\\Temp\\___go_build_main_go__1_.exe #gosetup<\/span> 2021-04-26T14:19:13.059+0800 DEBUG log\/main.go:7 \u8fd9\u662fdebug\u65e5\u5fd7 2021-04-26T14:19:13.090+0800 INFO log\/main.go:8 *************************** 2021-04-26T14:19:13.090+0800 INFO log\/main.go:9 \u8fd9\u662finfo\u65e5\u5fd7 2021-04-26T14:19:13.090+0800 INFO log\/main.go:10 *************************** 2021-04-26T14:19:13.090+0800 WARN log\/main.go:11 \u8fd9\u662fwarn\u65e5\u5fd7 main.main D:\/work\/goWorkspace\/src\/helloGoMod\/log\/main.go:11 runtime.main D:\/Program Files\/Go\/src\/runtime\/proc.go:225 2021-04-26T14:19:13.090+0800 INFO log\/main.go:12 *************************** 2021-04-26T14:19:13.090+0800 ERROR log\/main.go:13 \u8fd9\u662ferror\u65e5\u5fd7 main.main D:\/work\/goWorkspace\/src\/helloGoMod\/log\/main.go:13 runtime.main D:\/Program Files\/Go\/src\/runtime\/proc.go:225 2021-04-26T14:19:13.090+0800 INFO log\/main.go:14 *************************** 2021-04-26T14:19:13.090+0800 PANIC log\/main.go:15 \u8fd9\u662fpanic\u65e5\u5fd7 main.main D:\/work\/goWorkspace\/src\/helloGoMod\/log\/main.go:15 runtime.main D:\/Program Files\/Go\/src\/runtime\/proc.go:225 panic: \u8fd9\u662fpanic\u65e5\u5fd7 goroutine 1 [<\/span>running]<\/span>: go.uber.org\/zap\/zapcore.(<\/span>*CheckedEntry)<\/span>.Write(<\/span>0xc00013c0c0, 0x0, 0x0, 0x0)<\/span> D:\/work\/goWorkspace\/pkg\/mod\/go.uber.org\/zap@v1.16.0\/zapcore\/entry.go:234 +0x58d go.uber.org\/zap.(<\/span>*Logger)<\/span>.Panic(<\/span>0xc0000482a0, 0x5b9d71, 0x11, 0x0, 0x0, 0x0)<\/span> D:\/work\/goWorkspace\/pkg\/mod\/go.uber.org\/zap@v1.16.0\/logger.go:226 +0x86 main.main(<\/span>)<\/span> D:\/work\/goWorkspace\/src\/helloGoMod\/log\/main.go:15 +0x219 Process finished with exit<\/span> code 2 <\/code><\/pre>\n
zap.NewProduction()<\/h5>\n
package<\/span> main import<\/span> \"go.uber.org\/zap\"<\/span> func<\/span> main<\/span>(<\/span>)<\/span> { \n   <\/span> log,<\/span> _<\/span> :=<\/span> zap.<\/span>NewProduction<\/span>(<\/span>)<\/span> log.<\/span>Debug<\/span>(<\/span>\"\u8fd9\u662fdebug\u65e5\u5fd7\"<\/span>)<\/span> log.<\/span>Info<\/span>(<\/span>\"***************************\"<\/span>)<\/span> log.<\/span>Info<\/span>(<\/span>\"\u8fd9\u662finfo\u65e5\u5fd7\"<\/span>)<\/span> log.<\/span>Info<\/span>(<\/span>\"***************************\"<\/span>)<\/span> log.<\/span>Warn<\/span>(<\/span>\"\u8fd9\u662fwarn\u65e5\u5fd7\"<\/span>)<\/span> log.<\/span>Info<\/span>(<\/span>\"***************************\"<\/span>)<\/span> log.<\/span>Error<\/span>(<\/span>\"\u8fd9\u662ferror\u65e5\u5fd7\"<\/span>)<\/span> log.<\/span>Info<\/span>(<\/span>\"***************************\"<\/span>)<\/span> log.<\/span>Panic<\/span>(<\/span>\"\u8fd9\u662fpanic\u65e5\u5fd7\"<\/span>)<\/span> }<\/span> <\/code><\/pre>\n

\u8f93\u51fa<\/p>\n

GOROOT=<\/span>D:\\Program Files\\Go #gosetup<\/span> GOPATH=<\/span>D:\\work\\goWorkspace;<\/span>D:\\work\\goPath #gosetup<\/span> \"D:\\Program Files\\Go\\bin\\go.exe\"<\/span> build -o C:\\Users\\smart\\AppData\\Local\\Temp\\___go_build_main_go__1_.exe D:\/work\/goWorkspace\/src\/helloGoMod\/log\/main.go #gosetup<\/span> C:\\Users\\smart\\AppData\\Local\\Temp\\___go_build_main_go__1_.exe #gosetup<\/span> { \n   <\/span>\"level\"<\/span>:<\/span>\"info\"<\/span>,\"ts\"<\/span>:.,\"caller\"<\/span>:<\/span>\"log\/main.go:8\"<\/span>,\"msg\"<\/span>:<\/span>\"***************************\"<\/span>}<\/span> { \n   <\/span>\"level\"<\/span>:<\/span>\"info\"<\/span>,\"ts\"<\/span>:.,\"caller\"<\/span>:<\/span>\"log\/main.go:9\"<\/span>,\"msg\"<\/span>:<\/span>\"\u8fd9\u662finfo\u65e5\u5fd7\"<\/span>}<\/span> { \n   <\/span>\"level\"<\/span>:<\/span>\"info\"<\/span>,\"ts\"<\/span>:.,\"caller\"<\/span>:<\/span>\"log\/main.go:10\"<\/span>,\"msg\"<\/span>:<\/span>\"***************************\"<\/span>}<\/span> { \n   <\/span>\"level\"<\/span>:<\/span>\"warn\"<\/span>,\"ts\"<\/span>:.,\"caller\"<\/span>:<\/span>\"log\/main.go:11\"<\/span>,\"msg\"<\/span>:<\/span>\"\u8fd9\u662fwarn\u65e5\u5fd7\"<\/span>}<\/span> { \n   <\/span>\"level\"<\/span>:<\/span>\"info\"<\/span>,\"ts\"<\/span>:.,\"caller\"<\/span>:<\/span>\"log\/main.go:12\"<\/span>,\"msg\"<\/span>:<\/span>\"***************************\"<\/span>}<\/span> { \n   <\/span>\"level\"<\/span>:<\/span>\"error\"<\/span>,\"ts\"<\/span>:.,\"caller\"<\/span>:<\/span>\"log\/main.go:13\"<\/span>,\"msg\"<\/span>:<\/span>\"\u8fd9\u662ferror\u65e5\u5fd7\"<\/span>,\"stacktrace\"<\/span>:<\/span>\"main.main\\n\\tD:\/work\/goWorkspace\/src\/helloGoMod\/log\/main.go:13\\nruntime.main\\n\\tD:\/Program Files\/Go\/src\/runtime\/proc.go:225\"<\/span>}<\/span> { \n   <\/span>\"level\"<\/span>:<\/span>\"info\"<\/span>,\"ts\"<\/span>:.,\"caller\"<\/span>:<\/span>\"log\/main.go:14\"<\/span>,\"msg\"<\/span>:<\/span>\"***************************\"<\/span>}<\/span> { \n   <\/span>\"level\"<\/span>:<\/span>\"panic\"<\/span>,\"ts\"<\/span>:.,\"caller\"<\/span>:<\/span>\"log\/main.go:15\"<\/span>,\"msg\"<\/span>:<\/span>\"\u8fd9\u662fpanic\u65e5\u5fd7\"<\/span>,\"stacktrace\"<\/span>:<\/span>\"main.main\\n\\tD:\/work\/goWorkspace\/src\/helloGoMod\/log\/main.go:15\\nruntime.main\\n\\tD:\/Program Files\/Go\/src\/runtime\/proc.go:225\"<\/span>}<\/span> panic: \u8fd9\u662fpanic\u65e5\u5fd7 goroutine 1 [<\/span>running]<\/span>: go.uber.org\/zap\/zapcore.(<\/span>*CheckedEntry)<\/span>.Write(<\/span>0xc00013c0c0, 0x0, 0x0, 0x0)<\/span> D:\/work\/goWorkspace\/pkg\/mod\/go.uber.org\/zap@v1.16.0\/zapcore\/entry.go:234 +0x58d go.uber.org\/zap.(<\/span>*Logger)<\/span>.Panic(<\/span>0xc0000482a0, 0x5b9c50, 0x11, 0x0, 0x0, 0x0)<\/span> D:\/work\/goWorkspace\/pkg\/mod\/go.uber.org\/zap@v1.16.0\/logger.go:226 +0x86 main.main(<\/span>)<\/span> D:\/work\/goWorkspace\/src\/helloGoMod\/log\/main.go:15 +0x219 Process finished with exit<\/span> code 2 <\/code><\/pre>\n

SugaredLogger<\/h4>\n

\u5982\u679c\u6211\u4eec\u9700\u8981\u50cf\u4f7f\u7528fmt.Printf\u4e00\u6837\u8f93\u51fa\uff0c\u53ef\u4ee5\u4f7f\u7528SugaredLogger\uff0c
\u901a\u8fc7log.Sugar()\/Desugar()\u5207\u6362\uff0c
\u4f8b\u5b50\uff1a<\/p>\n

package<\/span> main import<\/span> (<\/span> \"fmt\"<\/span> \"go.uber.org\/zap\"<\/span> )<\/span> func<\/span> main<\/span>(<\/span>)<\/span> { \n   <\/span> fmt.<\/span>Printf<\/span>(<\/span>\"hello %v, helloZap\\n\"<\/span>,<\/span> \"yw\"<\/span>)<\/span> \/\/ hello yw, helloZap<\/span> log,<\/span> _<\/span> :=<\/span> zap.<\/span>NewDevelopment<\/span>(<\/span>)<\/span> log.<\/span>Info<\/span>(<\/span>\"hello \"<\/span> +<\/span> \"yw\"<\/span> +<\/span> \", helloZap\"<\/span>)<\/span> \/\/ 2021-04-26T14:35:32.531+0800 INFO log\/main.go:11 hello yw, helloZap<\/span> \/\/ SugaredLogger<\/span> sLog :=<\/span> log.<\/span>Sugar<\/span>(<\/span>)<\/span> \/\/ \u7c7b\u4f3cfmt.Println<\/span> sLog.<\/span>Info<\/span>(<\/span>\"hello \"<\/span>,<\/span> \"yw, \"<\/span>,<\/span> \"helloZap\"<\/span>)<\/span> \/\/ 2021-04-26T14:35:32.559+0800 INFO log\/main.go:15 hello yw, helloZap<\/span> \/\/ \u7c7b\u4f3cfmt.Printf<\/span> sLog.<\/span>Infof<\/span>(<\/span>\"hello %v, helloZap\"<\/span>,<\/span> \"yw\"<\/span>)<\/span> \/\/ 2021-04-26T14:35:32.559+0800 INFO log\/main.go:17 hello yw, helloZap<\/span> \/\/ \u5207\u6362\u5230\u6807\u51c6Logger<\/span> log =<\/span> sLog.<\/span>Desugar<\/span>(<\/span>)<\/span> }<\/span> <\/code><\/pre>\n

\u8f93\u51fa
\"go\u7b2c\u4e09\u65b9\u65e5\u5fd7\u5e93uber-go\/zap\u3001lumberjack<\/p>\n

\u65e5\u5fd7\u8f93\u51fa\u5230\u6587\u4ef6<\/h4>\n

\u521b\u5efaLogger\u7684\u65b9\u5f0f\u548c\u4e4b\u524d\u7565\u6709\u4e0d\u540c<\/p>\n

package<\/span> main import<\/span> (<\/span> \"go.uber.org\/zap\"<\/span> \"go.uber.org\/zap\/zapcore\"<\/span> \"os\"<\/span> )<\/span> func<\/span> main<\/span>(<\/span>)<\/span> { \n   <\/span> \/\/ \u7f16\u7801\u5668\u914d\u7f6e<\/span> config :=<\/span> zap.<\/span>NewProductionEncoderConfig<\/span>(<\/span>)<\/span> \/\/ \u6307\u5b9a\u65f6\u95f4\u7f16\u7801\u5668<\/span> config.<\/span>EncodeTime =<\/span> zapcore.<\/span>ISO8601TimeEncoder \/\/ \u65e5\u5fd7\u7ea7\u522b\u7528\u5927\u5199<\/span> config.<\/span>EncodeLevel =<\/span> zapcore.<\/span>CapitalLevelEncoder \/\/ \u7f16\u7801\u5668<\/span> encoder :=<\/span> zapcore.<\/span>NewConsoleEncoder<\/span>(<\/span>config)<\/span> \/\/ \u65e5\u5fd7\u6587\u4ef6<\/span> file,<\/span> _<\/span> :=<\/span> os.<\/span>Create<\/span>(<\/span>\".\/test.log\"<\/span>)<\/span> \/\/ \u5199\u65e5\u5fd7<\/span> sync :=<\/span> zapcore.<\/span>AddSync<\/span>(<\/span>file)<\/span> \/\/ \u521b\u5efaLogger<\/span> core :=<\/span> zapcore.<\/span>NewCore<\/span>(<\/span>encoder,<\/span> sync,<\/span> zapcore.<\/span>DebugLevel)<\/span> logger :=<\/span> zap.<\/span>New<\/span>(<\/span>core,<\/span> zap.<\/span>AddCaller<\/span>(<\/span>)<\/span>)<\/span> \/\/ \u6253\u5370\u65e5\u5fd7<\/span> logger.<\/span>Info<\/span>(<\/span>\"hello \"<\/span> +<\/span> \"yw\"<\/span> +<\/span> \", helloZap\"<\/span>)<\/span> \/\/ SugaredLogger<\/span> sLog :=<\/span> logger.<\/span>Sugar<\/span>(<\/span>)<\/span> \/\/ \u7c7b\u4f3cfmt.Println<\/span> sLog.<\/span>Info<\/span>(<\/span>\"hello \"<\/span>,<\/span> \"yw, \"<\/span>,<\/span> \"helloZap\"<\/span>)<\/span> \/\/ \u7c7b\u4f3cfmt.Printf<\/span> sLog.<\/span>Infof<\/span>(<\/span>\"hello %v, helloZap\"<\/span>,<\/span> \"yw\"<\/span>)<\/span> }<\/span> <\/code><\/pre>\n

\u8fd0\u884c
\"go\u7b2c\u4e09\u65b9\u65e5\u5fd7\u5e93uber-go\/zap\u3001lumberjack<\/p>\n

lumberjack<\/h3>\n

\u56e0\u4e3azap\u4e0d\u652f\u6301\u65e5\u5fd7\u5206\u5272\uff0c\u8fd9\u91cc\u5f15\u5165lumberjack<\/p>\n

\u5b89\u88c5<\/h4>\n

\u5728\u9879\u76ee\u76ee\u5f55\u4e0b\u547d\u4ee4\u884c\u6267\u884c<\/p>\n

go get -<\/span>u github.<\/span>com\/<\/span>natefinch\/<\/span>lumberjack <\/code><\/pre>\n

\"go\u7b2c\u4e09\u65b9\u65e5\u5fd7\u5e93uber-go\/zap\u3001lumberjack<\/p>\n

\u6574\u5408lumberjack<\/h4>\n

\u5728WriteSyncer\u4e2d\u6dfb\u52a0lumberjack\u652f\u6301<\/p>\n

package<\/span> main import<\/span> (<\/span> \"github.com\/natefinch\/lumberjack\"<\/span> \"go.uber.org\/zap\"<\/span> \"go.uber.org\/zap\/zapcore\"<\/span> )<\/span> func<\/span> main<\/span>(<\/span>)<\/span> { \n   <\/span> \/\/ \u7f16\u7801\u5668\u914d\u7f6e<\/span> config :=<\/span> zap.<\/span>NewProductionEncoderConfig<\/span>(<\/span>)<\/span> \/\/ \u6307\u5b9a\u65f6\u95f4\u7f16\u7801\u5668<\/span> config.<\/span>EncodeTime =<\/span> zapcore.<\/span>ISO8601TimeEncoder \/\/ \u65e5\u5fd7\u7ea7\u522b\u7528\u5927\u5199<\/span> config.<\/span>EncodeLevel =<\/span> zapcore.<\/span>CapitalLevelEncoder \/\/ \u7f16\u7801\u5668<\/span> encoder :=<\/span> zapcore.<\/span>NewConsoleEncoder<\/span>(<\/span>config)<\/span> \/*\/\/ \u65e5\u5fd7\u6587\u4ef6 file, _ := os.Create(\".\/test.log\") \/\/ \u5199\u65e5\u5fd7 sync := zapcore.AddSync(file)*\/<\/span> \/\/ \u4fee\u6539\u4e3a\u6dfb\u52a0lumberjack\u652f\u6301<\/span> lj :=<\/span> &<\/span>lumberjack.<\/span>Logger{ \n   <\/span> Filename:<\/span> \".\/test.log\"<\/span>,<\/span> MaxSize:<\/span> 1<\/span>,<\/span> \/\/ \u65e5\u5fd7\u6587\u4ef6\u6700\u59271M<\/span> MaxBackups:<\/span> 5<\/span>,<\/span> MaxAge:<\/span> 7<\/span>,<\/span> \/\/ \u65e5\u5fd7\u4fdd\u7559\u6700\u957f\u65f6\u95f47\u5929<\/span> Compress:<\/span> false<\/span>,<\/span> }<\/span> sync :=<\/span> zapcore.<\/span>AddSync<\/span>(<\/span>lj)<\/span> \/\/ \u521b\u5efaLogger<\/span> core :=<\/span> zapcore.<\/span>NewCore<\/span>(<\/span>encoder,<\/span> sync,<\/span> zapcore.<\/span>DebugLevel)<\/span> logger :=<\/span> zap.<\/span>New<\/span>(<\/span>core,<\/span> zap.<\/span>AddCaller<\/span>(<\/span>)<\/span>)<\/span> \/\/ \u6253\u5370\u65e5\u5fd7<\/span> logger.<\/span>Info<\/span>(<\/span>\"hello \"<\/span> +<\/span> \"yw\"<\/span> +<\/span> \", helloZap\"<\/span>)<\/span> \/\/ SugaredLogger<\/span> sLog :=<\/span> logger.<\/span>Sugar<\/span>(<\/span>)<\/span> \/\/ \u7c7b\u4f3cfmt.Println<\/span> sLog.<\/span>Info<\/span>(<\/span>\"hello \"<\/span>,<\/span> \"yw, \"<\/span>,<\/span> \"helloZap\"<\/span>)<\/span> \/\/ \u7c7b\u4f3cfmt.Printf<\/span> sLog.<\/span>Infof<\/span>(<\/span>\"hello %v, helloZap\"<\/span>,<\/span> \"yw\"<\/span>)<\/span> }<\/span> <\/code><\/pre>\n

\u6211\u9996\u5148\u4fee\u6539test.log\u6587\u4ef6\u5185\u5bb9\u8d85\u8fc71M\uff0c\u7136\u540e\u518d\u8fd0\u884c\u4ee3\u7801
\"go\u7b2c\u4e09\u65b9\u65e5\u5fd7\u5e93uber-go\/zap\u3001lumberjack
\u53ef\u4ee5\u770b\u5230lumberjack\u5df2\u4e3a\u6211\u4eec\u751f\u6210\u4e86\u4e00\u4e2a\u65b0\u7684\u65e5\u5fd7\u6587\u4ef6
\"go\u7b2c\u4e09\u65b9\u65e5\u5fd7\u5e93uber-go\/zap\u3001lumberjack<\/p>\n","protected":false},"excerpt":{"rendered":"go\u7b2c\u4e09\u65b9\u65e5\u5fd7\u5e93uber-go\/zap\u3001lumberjackuber-go\/zap\u3001lumberjackzap\u662fuber\u5f00\u6e90\u7684go\u8bed\u8a00\u9ad8\u6027\u80fd\u65e5\u5fd7\u5e93\uff0clumberjack\u662fzap\u5b98\u65b9\u63a8...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/4944"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=4944"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/4944\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=4944"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=4944"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=4944"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}