views:

401

answers:

1

I'm trying to configure log4net with Unity, but I don't think I fullu understand what needs to be done.

In particular I can't figure how to log the %thread such that it logs the name of the class.

I created a MyLog4Net : ILogger class, but I don't get how I pass this class the calling class and how this relates to the logger name in the config section ( < logger name="File" > ).

If someone could explain this to me I'd be grateful. Thanks

+1  A: 

The pattern for logging the name of the logger (I assume you want to use the class as logger name) is not %thread but %logger. You can find more samples here.

This question discusses the same problem of how to pass the type requesting injection to the logger using Ninject. Not sure how you would do this with Unity though.

Peter Lillevold
thanks for that ... helpful links
Paul