[
https://issues.apache.org/jira/browse/LOG4NET-372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Carlin Scott updated LOG4NET-372:
---------------------------------
Description:
I made a renderer that applies to objects with the DataContract attribute. It
would be nice if I could instruct log4net to use that renderer for all objects
with that attribute.
{code}
public IObjectRenderer Get(Type type)
{
...
if (result == null){
System.Attribute[] attrs = System.Attribute.GetCustomAttributes(type);
// reflection
foreach (System.Attribute attr in attrs)
{
if(result = Get(attr.GetType()) != null) break;
}
...
}
{code}
was:I made a renderer that applies to objects with the DataContract
attribute. It would be nice if I could instruct log4net to use that renderer
for all objects with that attribute.
> Map IObjectRenderer by attribute
> --------------------------------
>
> Key: LOG4NET-372
> URL: https://issues.apache.org/jira/browse/LOG4NET-372
> Project: Log4net
> Issue Type: Improvement
> Components: Core
> Affects Versions: 1.2.11
> Reporter: Carlin Scott
> Priority: Minor
>
> I made a renderer that applies to objects with the DataContract attribute. It
> would be nice if I could instruct log4net to use that renderer for all
> objects with that attribute.
> {code}
> public IObjectRenderer Get(Type type)
> {
> ...
> if (result == null){
> System.Attribute[] attrs =
> System.Attribute.GetCustomAttributes(type); // reflection
> foreach (System.Attribute attr in attrs)
> {
> if(result = Get(attr.GetType()) != null) break;
> }
> ...
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira