The FAQ here--
states that the following are equivalent ways to obtain a logger:
(1) private static readonly ILog log = LogManager.GetLogger(typeof(Foo));
(2) private static readonly ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
However, these constructs seem to behave differently when the classes involved are generic. When generic classes are involved, I believe the former generates a different logger for each type parameter combination, while the latter generates a different logger if and only if the number of type parameters is different.
TestClass<T, S> can yield "TestClass`2[[System.Int32..." in the former case and "TestClass`2" in the latter.
|Field||Original Value||New Value|
|Assignee||Ron Grabowski [ ron ]|
|Affects Version/s||1.2.10 [ 11128 ]|
|Fix Version/s||1.2.11 [ 12310980 ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Resolution||Fixed [ 1 ]|
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|1214d 5h 54m||1||Stefan Bodewig||20/Sep/11 16:41|