是否有一种方法可以用例如log4j来执行更新或插入,例如具有以下配置:
<appender name="DB_LOG_QMS_UPDATE" class="com.package.DatabaseLogger">
<connectionSource
class="ch.qos.logback.core.db.DriverManagerConnectionSource">
<driverClass>${db_logger_driver}</driverClass>
<url>jdbc:postgresql://localhost:5432/mydatabase?currentSchema=scheme</url>
<user>user</user>
<password>mypwd</password>
</connectionSource>
<tableName>test_logs</tableName>
<sql>**dynamic sentence**</sql>
<prepareDataInterface>com.package.LogImpl</prepareDataInterface>
</appender>
我正在寻找的是生成sql属性dinamicaly
预先感谢