CAS 5.3, where is LOGGER defined with @Slf4j?

44 views
Skip to first unread message

Yan Zhou

unread,
Oct 8, 2018, 10:32:45 AM10/8/18
to CAS Community
Hello,

Looking at CAS 5.3 source code,   I need to customize action class, so I create a class with the same name/package in my overlay, but I cannot resolve compile error on LOGGER.

I understand with Lombok and @Slf4j, I get object: log  for free. But, I do not know how LOGGER is defined in CAS code.

Thx!
Yan


in action classes, I see this:


@Slf4j
public class SendPasswordResetInstructionsAction extends AbstractAction {
    
LOGGER.debug(...)   <== this is how logging is done, is this referring to the same logger object in parent?

In AbstractAction, i see this.

protected final Log logger = LogFactory.getLog(getClass());

Thanks,
Yan

Andy Ng

unread,
Oct 8, 2018, 10:53:41 AM10/8/18
to CAS Community
Hi Yan,

To make @Slf4j works, see "https://apereo.github.io/cas/developer/Build-Process-5X.html#plugins" the Lombok plugin is what you want to look at.

Alternatively, going back in time to CAS 5.2.x and you will see how LOGGER is originally implemented. Your cited class "SendPasswordResetInstructionAction" is not a very good example, since it is inconsistent  with other similar classes (in CAS 5.2.x that is~).


And only looking at the part about LOGGER and @Slf4j. You will see how the LOGGER evolve into @Slf4j :) 

Hope that make sense to you!

Cheers!
- Andy


Robert Oschwald

unread,
Oct 8, 2018, 10:54:01 AM10/8/18
to cas-...@apereo.org
https://projectlombok.org/features/log


See lombok.config file
You need this file in your overlay project.




--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
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 cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/ce7fb5fb-4cfe-4926-a14c-be5a18cb44b1%40apereo.org.

signature.asc

Robert Oschwald

unread,
Oct 8, 2018, 10:56:41 AM10/8/18
to cas-...@apereo.org
signature.asc

jaya swamy

unread,
Oct 8, 2018, 11:22:33 AM10/8/18
to cas-...@apereo.org
How to check whether default authentication configuration is casuser::Mellon or taking from configured database 
Using logs

Reply all
Reply to author
Forward
0 new messages