[
https://issues.apache.org/jira/browse/LOG4NET-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713884#action_12713884
]
Chris Jerdonek commented on LOG4NET-136:
----------------------------------------
I agree that string parsing is better.
Would "RemoveSystemPrefix=true" be the first use of such a syntax in a log4net
configuration, or are there already options like that? It seems like a
reasonable option.
If such a syntax is allowed, then perhaps the existing %logger pattern could be
used instead. There are already many similar pattern names: c, C, class,
logger, type. It could recognize a parameter like "GenericTypeFormat=CS".
Is the verboseness issue already an issue, since the version information etc is
already left off for non-generic types?
The converter should also handle generic type names with unspecified type
parameters. These can arise, for example, as discussed here:
https://issues.apache.org/jira/browse/LOG4NET-157
I believe another way to get the type with unspecified parameters is as follows:
if (type.IsGenericType)
{
genericType = type.GetGenericTypeDefinition();
}
> logger conversionPattern restriction doesn't work correctly for Generic
> classes
> -------------------------------------------------------------------------------
>
> Key: LOG4NET-136
> URL: https://issues.apache.org/jira/browse/LOG4NET-136
> Project: Log4net
> Issue Type: Bug
> Affects Versions: 1.2.10
> Environment: Windows 2000 Professional, .NET Framework 2.0
> Reporter: Tom Crossland
> Assignee: Ron Grabowski
> Priority: Minor
> Fix For: 1.2.11
>
> Attachments: ConsoleApplication3-GenericPrettyPrinter.zip
>
>
> <conversionPattern value="%date %-5level %logger{1} - %message%newline"/>
> Using the above conversion pattern for a logger of a Generic class (i.e.
> My.System.MyClass<My.System.MyObject>) will result in the following log
> output:
> 2008-01-17 21:54:48,968 INFO 0, Culture=neutral, PublicKeyToken=null]] - My
> error message
> Obviously, in this case it's not appropriate to just take the portion of the
> class name after the last '.' character.
> Thanks
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.