{"id":474,"date":"2016-03-12T23:41:27","date_gmt":"2016-03-12T14:41:27","guid":{"rendered":"http:\/\/www.typea.info\/blog\/index.php\/2016\/03\/12\/python_4\/"},"modified":"2016-03-12T23:41:27","modified_gmt":"2016-03-12T14:41:27","slug":"python_4","status":"publish","type":"post","link":"https:\/\/www.typea.info\/blog\/index.php\/2016\/03\/12\/python_4\/","title":{"rendered":"Python \u30ed\u30b0\u3092\u6307\u5b9a\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306b\u51fa\u529b\u3059\u308b"},"content":{"rendered":"<p>Django \u3068\u304b\u4f7f\u3046\u5834\u5408\u306f\u3001logging \u306e\u8a2d\u5b9a\u3092\u304b\u3051\u3070\u3088\u304b\u3063\u305f\u304c\u3001\u5358\u4f53Python\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3001\u3061\u3087\u3063\u3068\u8fbc\u307f\u5165\u3063\u305f\u3053\u3068\u3092\u3084\u308b\u3068\u304d\u306b\u3001\u4efb\u610f\u306e\u5834\u6240\u306b\u30ed\u30b0\u3092\u51fa\u529b\u3057\u305f\u3044\u3002<\/p>\n<p><a href=\"https:\/\/instagram.com\/kaela_official\/\">\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092<\/a>\u3056\u3063\u3068\u8aad\u3093\u3067\u3082\u8981\u9818\u3092\u5f97\u306a\u304b\u3063\u305f\u304c\u3001<\/p>\n<p><a href=\"http:\/\/qiita.com\/amedama\/items\/b856b2f30c2f38665701\">\u30ed\u30b0\u51fa\u529b\u306e\u305f\u3081\u306e print \u3068 import logging \u306f\u3084\u3081\u3066\u307b\u3057\u3044<\/a><\/p>\n<p>\u304c\u308f\u304b\u308a\u3084\u3059\u304b\u3063\u305f\u3002<\/p>\n<p>\u4eca\u5f8c\u306e\u305f\u3081\u306b\u30e1\u30e2\u3002<\/p>\n<pre class=\"prettyprint linenums\">#\u30ed\u30ae\u30f3\u30b0\u8a2d\u5b9a\r\nlogger = getLogger(__name__)\r\nif not logger.handlers:\r\n    fileHandler = FileHandler(r'\/logs\/app.log')\r\n    fileHandler.setLevel(DEBUG)\r\n    streamHander = StreamHandler()\r\n    streamHander.setLevel(DEBUG)\r\n    logger.setLevel(DEBUG)\r\n    logger.addHandler(fileHandler)\r\n    logger.addHandler(streamHander)\r\n#\u30ed\u30ae\u30f3\u30b0\r\nlogger.info(&quot;test&quot;)<\/pre>\n<p>\u9069\u5f53\u306b\u3001\u30cf\u30f3\u30c9\u30e9\u3092\u3064\u3051\u305f\u308a\u3068\u3063\u305f\u308a\u3059\u308b\u3002<\/p>\n<p><a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/4873117569\/ref=as_li_ss_il?ie=UTF8&amp;camp=247&amp;creative=7399&amp;creativeASIN=4873117569&amp;linkCode=as2&amp;tag=typea09-22\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-fe.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=4873117569&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=typea09-22\" \/><\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-left-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px\" border=\"0\" alt=\"\" src=\"http:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=as2&amp;o=9&amp;a=4873117569\" width=\"1\" height=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Django \u3068\u304b\u4f7f\u3046\u5834\u5408\u306f\u3001logging \u306e\u8a2d\u5b9a\u3092\u304b\u3051\u3070\u3088\u304b\u3063\u305f\u304c\u3001\u5358\u4f53Python\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3001\u3061\u3087\u3063\u3068\u8fbc\u307f\u5165\u3063\u305f\u3053\u3068\u3092\u3084\u308b\u3068\u304d\u306b\u3001\u4efb\u610f\u306e\u5834\u6240\u306b\u30ed\u30b0\u3092\u51fa\u529b\u3057\u305f\u3044\u3002 \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u3056\u3063\u3068\u8aad\u3093\u3067\u3082\u8981\u9818\u3092\u5f97\u306a\u304b\u3063\u305f\u304c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[20],"tags":[],"class_list":["post-474","post","type-post","status-publish","format-standard","hentry","category-python"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/474","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=474"}],"version-history":[{"count":0,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/474\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=474"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=474"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}