what does log4net System.Reflection.MethodBase.GetCurrentMethod().DeclaringType do?

Gavo

New Member
one of steps to setup log4net is to add the code below to each class that uses it :\[code\]private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);\[/code\]here it's said that:\[quote\] It does a System.Reflection call to get the current class information. This is useful because it allows us to use this code all over but have the specific information passed into it in each class\[/quote\]what information are these? if I encapsulate log4net codes in a class instead of using log4net codes in all classes that need it , is there any information that I may loss ?
 
Back
Top