log4net conversion pattern: specifying the logger name
I'm using log4net with the following partial conversion pattern:
%logger{2}
This outputs the last two dot separated tokens of the logger name. For example, a logger named Foo.Bar.Baz.Qux will be displayed 开发者_运维百科as Baz.Qux. Great.
Is there a partial conversion pattern syntax to specify "everything except for the first two dot separated tokens of the logger name"? For example, i'd like the logger "Foo.Bar.Baz.Qux.Quux" to be displayed as "Baz.Qux.Quux".
There is no such syntax. You could write your own pattern converter though. Here is a sample of a pattern converter. As you can see it is quite easy to do that. If you are interested I can post later the code of a converter that would meed your requirements...
精彩评论