[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-user
Subject:    Re: property check..
From:       Zhu Qifei <zhuqifei () ufinity ! com>
Date:       2004-10-21 2:01:09
Message-ID: 41771865.60604 () ufinity ! com
[Download RAW message or body]

Thanks, but the issue here is, I don't know what the class is and what 
the property is, my question was how to determine
Class.forName(string_name_of_a_log4jclass) whether has a 
string_name_of_a_property. I tried the java reflection API, but 
getFields() only gives public ones, hiwhc are not enough, and 
getDeclaredFields() only gives the declared fields of this class, 
whereas what I want is all the fields recursively upto all the super 
classes.(getFields() does this recursive search) Other than that I write 
a loop to get all the super classes then getDeclaredFields at every 
super class, is there any more elegant way to do that?

Thank you very much!

Regards
Qifei

Wagle, Shriniwas wrote:

>A DailyRollingFileAppender has a getDatePattern() method to get the
>pattern.
>
>- Raj
>
>-----Original Message-----
>From: Zhu Qifei [mailto:zhuqifei@ufinity.com] 
>Sent: Tuesday, October 19, 2004 9:56 PM
>To: Log4J Users List
>Subject: property check..
>
>Hi,
>
>   I'm using log4j1.2.8, is there anyway to check for a particular
>appender, say RollingFileAppender, whether it has a property, say
>datePattern programmatically?
>
>Thanks
>Qifei
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic