日期:2014-05-16  浏览次数:20505 次

pentaho增加基于DB的audit日志

1、修改biserver-ce/pentaho-solutions/system/pentahoObjects.spring.xml
 <!--bean id="IAuditEntry" class="org.pentaho.platform.engine.services.audit.AuditFileEntry" scope="singleton" /把这个去掉,改成下面的SQLEntry-->
  <bean id="IAuditEntry" class="org.pentaho.platform.engine.services.audit.AuditSQLEntry" scope="singleton" />
 
?
2、建表pro_audit
? ??create table PRO_AUDIT
(
  JOB_ID             VARCHAR2(160),
  INST_ID            VARCHAR2(60),
  OBJ_ID             VARCHAR2(160),
  OBJ_TYPE           VARCHAR2(60),
  ACTOR              VARCHAR2(60),
  MESSAGE_TYPE       VARCHAR2(60),
  MESSAGE_NAME       VARCHAR2(60),
  MESSAGE_TEXT_VALUE VARCHAR2(60),
  MESSAGE_NUM_VALUE  VARCHAR2(60),
  DURATION           VARCHAR2(60),
  AUDIT_TIME         VARCHAR2(60),
  AUDIT_ID           NUMBER
)

?

3、修改audit_sql

      cp biserver-ce/pentaho-solutions/system/dialects/postgresql/audit_sql.xml pentaho/biserver-ce/pentaho-solutions/system/audit_sql.xml
? ?

4、重启pentaho