[
https://issues.apache.org/jira/browse/LOG4NET-136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ron Grabowski updated LOG4NET-136:
----------------------------------
Attachment: ConsoleApplication3-GenericPrettyPrinter.zip
Sample code to convert:
System.Collections.Generic.Dictionary`2[[System.Collections.Generic.Dictionary`2[[System.Collections.Generic.List`1[[System.Int32,
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]],
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089],[System.Collections.Generic.List`1[[System.String,
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]],
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]],
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089],[System.Collections.Generic.List`1[[System.String,
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]],
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
into:
VB: Dictionary(Of Dictionary(Of List(Of Int32), List(Of String)), List(Of
String))
CS: Dictionary<Dictionary<List<Int32>, List<String>>, List<String>>
A better implementation might recursively parse the string instead of
converting the string back into a Type then back into a string...
> 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.