Monday, April 20, 2009

log4net and Spring.Net, once again

Here's the goo to configure log4net in your spring.net config, assuming a property of type ILog named "log". It will initialize it with a named logger for "Document".
<property name="log">
<object type="log4net.LogManager,log4net" method="GetLogger">
<constructor-arg value="Document">
</constructor-arg></object>
</property>

Not that much to it, after all.

No comments:

Post a Comment