<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>akihisa_oishi</author_name>
  <author_url>https://blog.hatena.ne.jp/akihisa_oishi/</author_url>
  <blog_title>aoishiの備忘録</blog_title>
  <blog_url>https://aoishi.hateblo.jp/</blog_url>
  <categories>
    <anon>Python</anon>
    <anon>備忘録</anon>
  </categories>
  <description>はじめに Pythonでloggingモジュールを使う際の備忘録です。 下記の要求を実現することを目的としています。 ライブラリ化したいコードがあり、デバッグ目的などでログを出力させたい。 ライブラリで発生した例外のトレースも同じログに出力させたい。 ライブラリを利用するスクリプトがあり、ログの出力先やログレベルなどをカスタマイズしたい。 方法 ライブラリ側のロギング設定 logging.getLogger()でモジュール名（__name__）を指定して名前付きでロガーを作成します。 ロガーは階層構造になっており、ここで作成したロガーはルートロガーの子ロガーとなります。 ルートロガーはlogg…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Faoishi.hateblo.jp%2Fentry%2F2017%2F10%2F09%2F021054&quot; title=&quot;Pythonでloggingモジュール使ってライブラリ内でログ出力する時のまとめ - aoishiの備忘録&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn.blog.st-hatena.com/images/theme/og-image-1500.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-10-09 02:10:54</published>
  <title>Pythonでloggingモジュール使ってライブラリ内でログ出力する時のまとめ</title>
  <type>rich</type>
  <url>https://aoishi.hateblo.jp/entry/2017/10/09/021054</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
