{"id":1500,"date":"2026-10-28T13:09:03","date_gmt":"2026-10-28T04:09:03","guid":{"rendered":"https:\/\/danlabs.kr\/?p=1500"},"modified":"2026-11-14T01:53:56","modified_gmt":"2026-11-13T16:53:56","slug":"python-logging-%eb%a1%9c%ea%b7%b8%ea%b0%80-%eb%91%90-%eb%b2%88-%ec%b0%8d%ed%9e%88%eb%8a%94-%ec%9d%b4%ec%9c%a0-%ec%a0%84%ed%8c%8c%ec%99%80-%ed%95%b8%eb%93%a4%eb%9f%ac-%ec%84%a4%ec%a0%95","status":"publish","type":"post","link":"https:\/\/danlabs.kr\/?p=1500","title":{"rendered":"Python logging \ub85c\uadf8\uac00 \ub450 \ubc88 \ucc0d\ud788\ub294 \uc774\uc720 \u2014 \uc804\ud30c\uc640 \ud578\ub4e4\ub7ec \uc124\uc815 \ud655\uc778\ud558\uae30"},"content":{"rendered":"<p>\uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ub85c\uadf8 \ud55c \uc904\uc774 \ucf58\uc194\uc5d0 \ub450 \ubc88 \ub098\ud0c0\ub09c\ub2e4\uba74, \uac19\uc740 \uc774\ubca4\ud2b8\uac00 \uc11c\ub85c \ub2e4\ub978 \ud578\ub4e4\ub7ec\ub85c \uc804\ub2ec\ub418\ub294\uc9c0 \ud655\uc778\ud574\uc57c \ud574\uc694. Python \ud45c\uc900 logging\uc758 \ub85c\uac70 \uacc4\uce35\uacfc \uc804\ud30c, \ub85c\uac70\u00b7\ud578\ub4e4\ub7ec \uc218\uc900 \uc124\uc815\uc744 \uc911\uc2ec\uc73c\ub85c \uc6d0\uc778\uc744 \uc9da\uc5b4\ubcfc\uac8c\uc694.[1][2]<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/10\/dev-20261028-inline1.jpg\" alt=\"\ub8e8\ud2b8, \uc0c1\uc704, \ud558\uc704 \ub85c\uac70\uc758 \uacc4\uce35\" \/><\/figure>\n<h2>\ub85c\uac70 \uacc4\uce35\uc744 \ub530\ub77c \uc774\ubca4\ud2b8\uac00 \uc804\ud30c\ub418\ub294 \ubc29\uc2dd<\/h2>\n<p><code>logging.getLogger(__name__)<\/code>\uc740 \ud604\uc7ac \ubaa8\ub4c8 \uc774\ub984\uc744 \ub85c\uac70 \uc774\ub984\uc73c\ub85c \uc4f0\ub294 \uc77c\ubc18\uc801\uc778 \ubc29\ubc95\uc774\uc5d0\uc694. \uc774\ub984\uc5d0 \uc810\uc774 \ub4e4\uc5b4\uac00\uba74 \uacc4\uce35\uc774 \ub9cc\ub4e4\uc5b4\uc838\uc694. \uc608\ub97c \ub4e4\uc5b4 <code>app.worker<\/code>\ub294 <code>app<\/code>\uc758 \ud558\uc704 \ub85c\uac70\uc774\uba70, \ubaa8\ub4e0 \ub85c\uac70 \uc704\uc5d0\ub294 root \ub85c\uac70\uac00 \uc788\uc5b4\uc694.[1]<\/p>\n<p>\ub85c\uac70\uac00 \uae30\ub85d\ud558\uae30\ub85c \uacb0\uc815\ud55c \uc774\ubca4\ud2b8\ub294 \uc5f0\uacb0\ub41c \ud578\ub4e4\ub7ec\uc5d0 \uc804\ub2ec\ub3fc\uc694. \uc804\ud30c\uac00 \ucf1c\uc838 \uc788\uc73c\uba74 \uc0c1\uc704 \ub85c\uac70\uc758 \ud578\ub4e4\ub7ec\uc5d0\ub3c4 \uc774\uc5b4\uc11c \uc804\ub2ec\ub429\ub2c8\ub2e4. \uac19\uc740 \ub85c\uac70 \uc774\ub984\uc73c\ub85c <code>getLogger()<\/code>\ub97c \uc5ec\ub7ec \ubc88 \ud638\ucd9c\ud558\uba74 \uac19\uc740 \ub85c\uac70 \uac1d\uccb4\uac00 \ub3cc\uc544\uc640\uc694.[1]<\/p>\n<h2>\ud558\uc704\uc640 \uc0c1\uc704\uc758 \ud578\ub4e4\ub7ec\uac00 \uac19\uc740 \ub808\ucf54\ub4dc\ub97c \ucd9c\ub825\ud560 \uc218 \uc788\uc5b4\uc694<\/h2>\n<p><code>app.worker<\/code>\uc640 \uadf8 \uc0c1\uc704 <code>app<\/code>\uc5d0 \uac01\uac01 \ucf58\uc194 \ud578\ub4e4\ub7ec\uac00 \uc788\uace0 \uc804\ud30c\uac00 \ucf1c\uc838 \uc788\ub2e4\uba74, \ud55c \ub808\ucf54\ub4dc\uac00 \ub450 \ud578\ub4e4\ub7ec\uc5d0 \uc804\ub2ec\ub420 \uc218 \uc788\uc5b4\uc694. \uacf5\uc2dd \ubb38\uc11c\ub3c4 \ub85c\uac70\uc640 \uc0c1\uc704 \ub85c\uac70\uc5d0 \ud578\ub4e4\ub7ec\ub97c \ud568\uaed8 \ubd99\uc774\uba74 \uac19\uc740 \ub808\ucf54\ub4dc\uac00 \uc5ec\ub7ec \ubc88 \ucd9c\ub825\ub420 \uc218 \uc788\ub2e4\uace0 \uc124\uba85\ud574\uc694.[1]<\/p>\n<p>\uba3c\uc800 \uc801\uc808\ud55c \uc0c1\uc704 \ub85c\uac70\uc5d0 \ud578\ub4e4\ub7ec\ub97c \ub450\uace0 \ud558\uc704 \ub85c\uac70\uc758 \uc804\ud30c\ub97c \ud65c\uc6a9\ud560 \uc218 \uc788\ub294\uc9c0 \uc0b4\ud3b4\ubcf4\uc138\uc694. \ud2b9\uc815 \ud558\uc704 \ub85c\uac70\uac00 \uc790\uccb4 \ud578\ub4e4\ub7ec\ub9cc \uc0ac\uc6a9\ud574\uc57c \ud55c\ub2e4\uba74 <code>propagate = False<\/code>\ub85c \uc0c1\uc704 \uc804\ub2ec\uc744 \uc911\ub2e8\ud560 \uc218 \uc788\uc5b4\uc694.[1] \ud558\uc704 \ub85c\uac70\uc640 root\uc5d0 \ubaa8\ub450 \ucf58\uc194 \ud578\ub4e4\ub7ec\uac00 \uc5f0\uacb0\ub3fc \uc788\uc744 \ub54c\ub3c4 \ud55c\ucabd\uc744 \uc81c\uac70\ud560 \uc218 \uc788\ub294\uc9c0 \uac80\ud1a0\ud558\ub418, \ub2e4\ub978 \ubaa8\ub4c8\uc758 \ucd9c\ub825\uc5d0 \ubbf8\uce58\ub294 \uc601\ud5a5\uc744 \ud568\uaed8 \ud655\uc778\ud574\uc57c \ud574\uc694.<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/10\/dev-20261028-inline2.jpg\" alt=\"\ud558\uc704\uc640 \uc0c1\uc704 \ud578\ub4e4\ub7ec\uc5d0 \ub85c\uadf8\uac00 \uc804\ub2ec\ub418\ub294 \uacfc\uc815\" \/><\/figure>\n<h2>\ub85c\uac70 \uc218\uc900\uacfc \ud578\ub4e4\ub7ec \uc218\uc900\uc740 \ub530\ub85c \ud655\uc778\ud574\uc57c \ud574\uc694<\/h2>\n<p>\ub85c\uac70 \uc218\uc900\uc740 \ud574\ub2f9 \ub85c\uac70\uac00 \uc5b4\ub5a4 \uc2ec\uac01\ub3c4\uc758 \uc774\ubca4\ud2b8\ub97c \ucc98\ub9ac\ud560\uc9c0 \uc815\ud558\uace0, \ud578\ub4e4\ub7ec \uc218\uc900\uc740 \uc804\ub2ec\ubc1b\uc740 \uc774\ubca4\ud2b8 \uc911 \ubb34\uc5c7\uc744 \ucd9c\ub825 \ub300\uc0c1\uc73c\ub85c \ubcf4\ub0bc\uc9c0 \uc815\ud574\uc694.[2] root \ub85c\uac70\ub294 \uae30\ubcf8\uc801\uc73c\ub85c <code>WARNING<\/code> \uc218\uc900\uc73c\ub85c \ub9cc\ub4e4\uc5b4\uc838\uc694.[1]<\/p>\n<p>\ud558\uc704 \ub85c\uac70\uc5d0 \uc218\uc900\uc744 \uba85\uc2dc\ud558\uc9c0 \uc54a\uc73c\uba74 \uc0c1\uc704 \uacc4\uce35\uc744 \uac70\uc2ac\ub7ec \uc720\ud6a8 \uc218\uc900\uc744 \ucc3e\uc544\uc694. \ud558\uc9c0\ub9cc \ud558\uc704 \ub85c\uac70\uac00 \uc774\ubbf8 \ud1b5\uacfc\uc2dc\ud0a8 \ub808\ucf54\ub4dc\uac00 \uc804\ud30c\ub420 \ub54c\ub294 \uc0c1\uc704 \ub85c\uac70\uc758 \uc218\uc900\uacfc \ud544\ud130\uac00 \ub2e4\uc2dc \uc801\uc6a9\ub418\uc9c0 \uc54a\uc544\uc694. \uc774\ub54c\ub294 \uc0c1\uc704 \ud578\ub4e4\ub7ec\uc758 \uc218\uc900\uc744 \ubcc4\ub3c4\ub85c \ud655\uc778\ud574\uc57c \ud574\uc694.[1] \uc0c1\uc704 \ub85c\uac70\uc758 \uc218\uc900\ub9cc \ubc14\uafd4\uc11c\ub294 \ucd9c\ub825\uc774 \uc608\uc0c1\ub300\ub85c \ub2ec\ub77c\uc9c0\uc9c0 \uc54a\uc744 \uc218 \uc788\ub294 \uc774\uc720\uc608\uc694.<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/10\/dev-20261028-inline3.jpg\" alt=\"\ub85c\uac70 \uc218\uc900\uacfc \ud578\ub4e4\ub7ec \uc218\uc900\uc758 \uad6c\ubd84\" \/><\/figure>\n<h2>\uc124\uc815 \uc704\uce58\uc640 \uc2e4\uc81c \ucd9c\ub825 \uacbd\ub85c \uc810\uac80\ud558\uae30<\/h2>\n<p><code>basicConfig()<\/code>\ub294 root \ub85c\uac70\ub97c \ube60\ub974\uac8c \uc124\uc815\ud558\ub294 \ubc29\ubc95\uc774\uc5d0\uc694.[1] \uacf5\uc2dd \uc548\ub0b4\ub294 \ub85c\uac70\uc758 \uae30\ub85d \uba54\uc11c\ub4dc\ub97c \ud638\ucd9c\ud558\uae30 \uc804\uc5d0 \uc124\uc815\ud560 \uac83\uc744 \uad8c\ud574\uc694.[2] \uc5ec\ub7ec \ubaa8\ub4c8\uc5d0\uc11c \uac01\uac01 \ud578\ub4e4\ub7ec\ub97c \ucd94\uac00\ud55c\ub2e4\uba74 \ucd08\uae30\ud654 \ucf54\ub4dc\uac00 \ubc18\ubcf5 \uc2e4\ud589\ub418\ub294\uc9c0\ub3c4 \uc810\uac80\ud558\uc138\uc694. \uacf5\ud1b5 \ucd08\uae30\ud654 \ud568\uc218\uc640 \uac1c\ubcc4 \ubaa8\ub4c8\uc5d0 \uc124\uc815\uc774 \ub098\ub258\uc5b4 \uc788\ub2e4\uba74 \ub450 \uc704\uce58\ub97c \ubaa8\ub450 \uc0b4\ud3b4\ubd10\uc57c \ud574\uc694.<\/p>\n<p>\uc5b4\ub290 \uacc4\uce35\uc5d0\ub3c4 \ud578\ub4e4\ub7ec\uac00 \uc5c6\uc73c\uba74 <code>lastResort<\/code> \ud578\ub4e4\ub7ec\uac00 \uba54\uc2dc\uc9c0\ub97c \ucc98\ub9ac\ud560 \uc218 \uc788\uc5b4\uc694.[1] \ub530\ub77c\uc11c \ucf58\uc194\uc5d0 \ucd9c\ub825\uc774 \ubcf4\uc778\ub2e4\ub294 \uc0ac\uc2e4\ub9cc\uc73c\ub85c \uc6d0\ud558\ub294 \ud578\ub4e4\ub7ec\uac00 \uc124\uc815\ub410\ub2e4\uace0 \ub2e8\uc815\ud560 \uc218\ub294 \uc5c6\uc5b4\uc694.<\/p>\n<p>\ub85c\uac70\ubcc4 \uc124\uc815\uacfc \ucd9c\ub825 \ub300\uc0c1\uc744 \ub098\ub780\ud788 \ub193\uace0 \ud655\uc778\ud560 \ud56d\ubaa9\uc740 \uc138 \uac00\uc9c0\uc608\uc694.[1][2]<\/p>\n<ol>\n<li><code>app.worker<\/code>\uc640 \uc0c1\uc704 <code>app<\/code>\uc5d0 \uac01\uac01 \ud578\ub4e4\ub7ec\uac00 \ubd99\uc5b4 \uc788\ub294\uc9c0 \ud655\uc778\ud574\uc694.<\/li>\n<li>\ud558\uc704 \ub85c\uac70\uc758 <code>propagate<\/code> \uac12\uc744 \ud655\uc778\ud574\uc694.<\/li>\n<li>\uc774\ubca4\ud2b8\ub97c \ucc98\uc74c \ucc98\ub9ac\ud558\ub294 \ub85c\uac70\uc758 \uc720\ud6a8 \uc218\uc900\uacfc \uc2e4\uc81c \ucd9c\ub825\uc744 \ub2f4\ub2f9\ud558\ub294 \ud578\ub4e4\ub7ec\uc758 \uc218\uc900\uc744 \uac01\uac01 \ud655\uc778\ud574\uc694.<\/li>\n<\/ol>\n<p>\uc124\uc815\uc744 \ubc14\uafbc \ub4a4\uc5d0\ub294 \uac1c\ubc1c \ud658\uacbd\uc5d0\uc11c \ucd9c\ub825\uc774 \ud55c \ubc88\ub9cc \ub098\ud0c0\ub098\ub294\uc9c0 \ubcc0\uacbd \uc804\ud6c4\ub97c \ube44\uad50\ud558\uc138\uc694. \ub2e4\ub978 \ubaa8\ub4c8\uc758 \uad00\ub828 \ub85c\uadf8\ub3c4 \ud568\uaed8 \ud655\uc778\ud574\uc57c \ud574\uc694. \uc2e4\uc81c \uc11c\ube44\uc2a4\uc5d0 \uc801\uc6a9\ud558\uae30 \uc804\uc5d0 \ud14c\uc2a4\ud2b8 \ud658\uacbd\uc5d0\uc11c \ud655\uc778\ud558\ub77c\ub294 \uac83\uc740 \ud3b8\uc9d1\uc0c1 \uad8c\uace0\uc608\uc694.<\/p>\n<p>\ud568\uaed8 \uc77d\uae30: <a href=\"https:\/\/danlabs.kr\/?p=1464\">Python venv \uacbd\ub85c \ud655\uc778\ud558\uae30<\/a><\/p>\n<h2>\ucc38\uace0<\/h2>\n<p>\ub85c\uac70 \uacc4\uce35\uacfc \uc804\ud30c, \uc124\uc815 API\ub294 [1]\uc5d0\uc11c, \ub85c\uae45 \uc218\uc900\uacfc \uae30\ubcf8 \uc124\uc815 \uc548\ub0b4\ub294 [2]\uc5d0\uc11c \ud655\uc778\ud560 \uc218 \uc788\uc5b4\uc694.<\/p>\n<ul>\n<li>[1] <a href=\"https:\/\/docs.python.org\/3\/library\/logging.html\" target=\"_blank\" rel=\"noopener noreferrer\">Python \uacf5\uc2dd \ubb38\uc11c \u2014 logging API<\/a> (2026-10-28 \uc870\ud68c)<\/li>\n<li>[2] <a href=\"https:\/\/docs.python.org\/3\/howto\/logging.html\" target=\"_blank\" rel=\"noopener noreferrer\">Python \uacf5\uc2dd \ubb38\uc11c \u2014 Logging HOWTO<\/a> (2026-10-28 \uc870\ud68c)<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\ud558\uc704 \ub85c\uac70\uc640 \uc0c1\uc704 \ub85c\uac70\uc5d0 \ucf58\uc194 \ud578\ub4e4\ub7ec\uac00 \uac01\uac01 \uc788\uc73c\uba74 \uac19\uc740 \ub85c\uadf8\uac00 \ub450 \ubc88 \ucd9c\ub825\ub420 \uc218 \uc788\uc5b4\uc694. \ud578\ub4e4\ub7ec \uc5f0\uacb0\uacfc \uc804\ud30c \uacbd\ub85c\ub97c \uba3c\uc800 \ud655\uc778\ud558\uace0, \ub85c\uac70 \uc218\uc900\uacfc \ud578\ub4e4\ub7ec \uc218\uc900\uc774 \uc801\uc6a9\ub418\ub294 \ucc28\uc774\ub3c4 \uad6c\ubd84\ud574\uc57c \ud574\uc694.<\/p>\n","protected":false},"author":1,"featured_media":2532,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-1500","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dev"],"featured_image_urls":{"full":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-logging-propagation-duplicate-handlers-1500-concept.webp",1536,1024,false],"thumbnail":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-logging-propagation-duplicate-handlers-1500-concept-150x150.webp",150,150,true],"medium":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-logging-propagation-duplicate-handlers-1500-concept-300x200.webp",300,200,true],"medium_large":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-logging-propagation-duplicate-handlers-1500-concept-768x512.webp",640,427,true],"large":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-logging-propagation-duplicate-handlers-1500-concept-1024x683.webp",640,427,true],"1536x1536":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-logging-propagation-duplicate-handlers-1500-concept.webp",1536,1024,false],"2048x2048":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-logging-propagation-duplicate-handlers-1500-concept.webp",1536,1024,false],"morenews-large":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-logging-propagation-duplicate-handlers-1500-concept.webp",825,550,false],"morenews-medium":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-logging-propagation-duplicate-handlers-1500-concept.webp",590,393,false],"danlabs-list-small":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-logging-propagation-duplicate-handlers-1500-concept-366x190.webp",366,190,true],"danlabs-list-retina":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-logging-propagation-duplicate-handlers-1500-concept-1464x760.webp",1464,760,true]},"author_info":{"display_name":"DanLABs","author_link":"https:\/\/danlabs.kr\/author\/hello-danlabs-kr"},"category_info":"<a href=\"https:\/\/danlabs.kr\/?cat=19\" rel=\"category\">\uac1c\ubc1c<\/a>","tag_info":"\uac1c\ubc1c","comment_count":"0","_links":{"self":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts\/1500","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1500"}],"version-history":[{"count":3,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts\/1500\/revisions"}],"predecessor-version":[{"id":2571,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts\/1500\/revisions\/2571"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/media\/2532"}],"wp:attachment":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}