General purpose Object property setter. Clients repeatedly invokes setProperty(name,value) in order to invoke setters on the Object specified in the constructor. This class relies on the JavaBeans Introspector to analyze the given Object Class using reflection.
Usage: PropertySetter ps = new PropertySetter(anObject); ps.set("name", "Joe"); ps.set("age", "32"); ps.set("isMale", "true"); will cause the invocations anObject.setName("Joe"), anObject.setAge(32), and setMale(true) if such methods exist with those signatures. Otherwise an IntrospectionException are thrown. Configuration DBAppender can be configured programmatically, or using JoranConfigurator. Example scripts can be found in the tests/input/db directory. Here are some more hints on how to setup DBAppender Hope this helps -Kamal. -----Original Message----- From: Guerra, Francesco [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 3:45 PM To: log4j-user@logging.apache.org Subject: DBAppender configuration in log4j.properties I have a working example of the log4j.xml file to configure the DBAppender. But I can not create the equivalent in a name/value pair format of a log4j.properties. This is what I tried: log4j.appender.DB=org.apache.log4j.db.DBAppender log4j.appender.DB.layout=org.apache.log4j.PatternLayout log4j.appender.DB.layout.ConversionPattern=%d %-5p [%t] %c - %m%n log4j.appender.DB.connectionSource=org.apache.log4j.db.DriverManagerConn ectionSource log4j.appender.DB.connectionSource.driverClass=com.mysql.jdbc.Driver log4j.appender.DB.connectionSource.url=jdbc:mysql://lxdnd729.dev.qintra. com:3306/ACCESS_MANAGER_LOG log4j.appender.DB.connectionSource.user=yyyy log4j.appender.DB.connectionSource.password=xxx I am getting the following error: WARN [main] (PropertySetter.java:178) - Failed to set property [connectionSource] to value "org.apache.log4j.db.DriverManagerConnectionSource". org.apache.log4j.config.PropertySetterException: Conversion to type [interface org.apache.log4j.db.ConnectionSource] failed. Could anybody help me with this? Thank you, Francesco This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]