Show page source of OutputLog_Interaction #80339

[[PageNavi(NavigationList)]]

=== ログ出力時の処理の流れ(概念的なもの) ===
 ここでは、[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html log4cpp::Category]クラスの[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#a763caceab3981c2e06811c29655b361b log]メソッド(あるいは優先度ごとに用意されたメソッド、すなわち、[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#aafa1ca0c9d57f9f87eae8628e89c5950 debug]、[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#ad218a5e279fc9b15a076bf62503f37b4 info]、[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#a5a4ba8063d108e275affa4aca5aec4ef notice]、[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#a9c372f41858234fe5ab0cfe94cfdb94a warn]、[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#a90d7771a3113219532878f1fea554afe error]、[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#acf854aca1676ede517914bf5185fc36d crit]、[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#aca8a704d6397ac3a4300966a6142460c alert]、[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#a3663faf2ad6873c3da8cdfef5780277a emerg]、[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#a249d46ce876a4af55a25226255e626fa fatal])を呼んだときにどのような流れで実際にログ出力が行われるかを説明します。

[[Thumb(outputLog_interaction.jpg, size=large, caption=図1 ログ出力時の処理の流れ)]]

 図1はログ出力時の処理の流れをUML2.0のシーケンス図で表記したものです。[[BR]]
細かい部分は省いています。実際には、Category::log()が呼ばれると、
 Category::log()[[BR]]
 →Category::_logUnconditionally()を呼び出し[[BR]]
  →Category::_logUnconditionally2()を呼び出し[[BR]]
   →LoggingEventを生成[[BR]]
   →Category::callAppenders()を呼び出し[[BR]]
    →Category::_appenderSetMutexをロック(図1のcritical複合フラグメントの部分)[[BR]]
    →Categoryが持つ全appenderに対してdoAppend()を呼び出し[[BR]]
    →additivityがtrue(かつ、親カテゴリがある場合(今のカテゴリがルートカテゴリではない場合))の場合、親のCategoryに対しcallAppenders()を呼び出し



[[PageNavi(NavigationList)]]