I do not know how to do this automatically. However, if you look at TraceLogger in the Castle git repository, you will see that they have essentially a wrapped and extended TraceSource to support hierarchy naming.
https://github.com/castleproject/Core/blob/master/src/Castle.Core/Core/Logging/TraceLogger.cs
I would copy the code here, but it may not be right to just cut and paste the code there in SO.
, , , ( Castle)
, ( ) "" ( TraceSource). , , . , . TraceSource, , TraceSource . , . . TraceSource, , . . TraceSources, "". TraceSource, ( "). TraceSource, , " TraceSource ", " *" TraceSource .
, - :
class MyTraceSource
{
private TraceSource ts;
public MyTraceSource(string name)
{
ResolveTraceSource(name);
}
private void ResolveTraceSource(string name)
{
}
}
- ( ), , , log4net NLog.
!