DP0001

Log4Jで

Logger#getLogger(String)を見ていたら、こんなことが書いてあった。

If the named logger already exists, then the existing instance will be returned. Otherwise, a new instance is created. 

もし、その名前のロガーがすでに存在するならばその存在するインスタンスが返却されます。そうでなければ、新しいインスタンスが作成されます。

これってLightWeightパターンだよね。

最終更新:2013年09月03日 11:18