Hi yn
If you need to log all events that are passed to
Slf4jLoggingAuditTrailManager I would suggest to look into
https://logging.apache.org/log4j/2.x/manual/appenders.html#JDBCAppender
as CAS is moving to implement logj42 or already did so. It would be
less invasive solution. You may also create your own logging
interceptor
to do the logging of some events.
Hope it helps,
Augustyn

On 14 March 2015 at 01:09, ZYD <[email protected]> wrote:
> I want to record login(success、failed) and logout infomation to database.
>
> how can i get login or logout infomation?
> or give me some suggest, thank you.
>
>
> 2015-03-13 17:42:13,088 INFO
> [org.jasig.cas.authentication.PolicyBasedAuthenticationManager] -
> <QueryDatabaseAuthenticationHandler failed authenticating
> zhangyingdong+password>
> 2015-03-13 17:42:13,092 INFO
> [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit
> trail record BEGIN
> =============================================================
> WHO: audit:unknown
> WHAT: supplied credentials: [zhangyingdong+password]
> ACTION: AUTHENTICATION_FAILED
> APPLICATION: CAS
> WHEN: Fri Mar 13 17:42:13 CST 2015
> CLIENT IP ADDRESS: 0:0:0:0:0:0:0:1
> SERVER IP ADDRESS: 0:0:0:0:0:0:0:1
> =============================================================
>
>>
> 2015-03-13 17:42:13,093 INFO
> [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit
> trail record BEGIN
> =============================================================
> WHO: audit:unknown
> WHAT: 1 errors, 0 successes
> ACTION: TICKET_GRANTING_TICKET_NOT_CREATED
> APPLICATION: CAS
> WHEN: Fri Mar 13 17:42:13 CST 2015
> CLIENT IP ADDRESS: 0:0:0:0:0:0:0:1
> SERVER IP ADDRESS: 0:0:0:0:0:0:0:1
> =============================================================
>
>>
>
> 2015-03-13 18:03:10,834 INFO
> [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit
> trail record BEGIN
> =============================================================
> WHO: audit:unknown
> WHAT:
> TGT-1-KdEZZpGcfs6sr1EtgRiwRPwe1JbrhwIhsrWAqztaplWcA7vIYz-cas01.example.org
> ACTION: TICKET_GRANTING_TICKET_CREATED
> APPLICATION: CAS
> WHEN: Fri Mar 13 18:03:10 CST 2015
> CLIENT IP ADDRESS: 0:0:0:0:0:0:0:1
> SERVER IP ADDRESS: 0:0:0:0:0:0:0:1
> =============================================================
>
>
>
>
> ________________________________
> [email protected]
>
> --
> 永不放弃, 成功就在下一步!
> 祝您成功!
>
> --
> You are currently subscribed to [email protected] as:
> [email protected]
> To unsubscribe, change settings or access archives, see
> http://www.ja-sig.org/wiki/display/JSG/cas-dev

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-dev

Reply via email to