You would need to put something this in your spring configuration
somewhere. If you have an auditTrailContext.xml, put it there:

    <bean id="inspektrTransactionManager"
          
class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
          p:dataSource-ref="dataSource"
            />

    <bean id="inspektrTransactionTemplate"
          class="org.springframework.transaction.support.TransactionTemplate"
          p:transactionManager-ref="inspektrTransactionManager"
          p:isolationLevelName="ISOLATION_READ_COMMITTED"
          p:propagationBehaviorName="PROPAGATION_REQUIRED"
            />

    <bean id="auditManager"
class="com.github.inspektr.audit.support.JdbcAuditTrailManager">
        <constructor-arg index="0" ref="inspektrTransactionTemplate"/>
        <property name="dataSource" ref="dataSource"/>
    </bean>


You'll need to make sure dataSource is defined in your context
somewhere and is a valid JDBC datasource.


On Tue, Aug 23, 2016 at 2:41 PM <[email protected]> wrote:

> Dears,
> i want to make the audit log which user logged in or logout date and time
> inserted into database
> audit like:-
>
> WHO: [username: usernameWHAT:
> TGT-2-HaGdPZMyiZKcdtOiy7wEx5S5H7JbR3VxaAw4T114s5T69TccwG-xxx.yyy.zzz.com
> <http://tgt-2-hagdpzmyizkcdtoiy7wex5s5h7jbr3vxaaw4t114s5t69tccwg-xxx.yyy.zzz.com/>
> ACTION: TICKET_GRANTING_TICKET_CREATED
> APPLICATION: CAS
> WHEN: Tue Aug 23 15:21:15 AST 2016
> CLIENT IP ADDRESS: 10.6.129.107
> SERVER IP ADDRESS: 10.98.162.225
>
> i want this audit insert in database
>
> i use cas 3.5.2
>
> please what is the configuration ?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "CAS Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/
> .
> To view this discussion on the web visit
> https://groups.google.com/a/apereo.org/d/msgid/cas-user/e4c5eece-2ad7-4bff-84b8-e3cba182b56e%40apereo.org
> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/e4c5eece-2ad7-4bff-84b8-e3cba182b56e%40apereo.org?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/a/apereo.org/d/optout.
>
-- 
-- Alex

-- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAAXiHZ6LWUdMmSOf4gf7ECeveqOuyUrTzvpaCxwM06zD7ATU0g%40mail.gmail.com.
For more options, visit https://groups.google.com/a/apereo.org/d/optout.

Reply via email to