Project

General

Profile

« Previous | Next » 

Revision a27635bd

Added by Andreas Müller over 1 year ago

ref #10072 adapt vaadin to log4j2 and cleanup

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/LoginPresenter.java
19 19
import javax.mail.internet.AddressException;
20 20

  
21 21
import org.apache.commons.lang.StringUtils;
22
import org.apache.log4j.Logger;
22
import org.apache.logging.log4j.LogManager;
23
import org.apache.logging.log4j.Logger;
23 24
import org.springframework.beans.factory.annotation.Autowired;
24 25
import org.springframework.beans.factory.annotation.Qualifier;
25 26
import org.springframework.core.env.Environment;
......
74 75

  
75 76
    private static final long serialVersionUID = 4020699735656994791L;
76 77

  
77
    private static final Logger log = Logger.getLogger(LoginPresenter.class);
78
    private final static Logger logger = LogManager.getLogger();
78 79

  
79 80
    private final static String PROPNAME_USER = "cdm-vaadin.login.usr";
80 81

  
......
111 112
        try {
112 113
            Authentication authentication = authenticationManager.authenticate(token);
113 114
            if(authentication != null && authentication.isAuthenticated()) {
114
                log.debug("user '" + userName + "' authenticated");
115
                logger.debug("user '" + userName + "' authenticated");
115 116
                currentSecurityContext().setAuthentication(authentication);
116 117
                if(NavigationManager.class.isAssignableFrom(getNavigationManager().getClass())){
117 118
                    uiEventBus.publish(this, new AuthenticationSuccessEvent(userName));
118
                    log.debug("redirecting to " + redirectToState);
119
                    logger.debug("redirecting to " + redirectToState);
119 120
                    uiEventBus.publish(this, new NavigationEvent(redirectToState));
120 121
                }
121 122
            }
......
151 152

  
152 153
        // attempt to auto login
153 154
        if(StringUtils.isNotEmpty(System.getProperty(PROPNAME_USER)) && StringUtils.isNotEmpty(System.getProperty(PROPNAME_PASSWORD))){
154
            log.warn("Performing autologin with user " + System.getProperty(PROPNAME_USER));
155
            logger.warn("Performing autologin with user " + System.getProperty(PROPNAME_USER));
155 156
            authenticate(System.getProperty(PROPNAME_USER), System.getProperty(PROPNAME_PASSWORD));
156 157
        }
157 158

  
......
162 163
        if(getView()!= null){
163 164
            authenticate(event.getPayload().getUserName(), getView().getLoginDialog().getPassword().getValue());
164 165
        } else {
165
            log.info("view is NULL, not yet disposed LoginPresenter?");
166
            logger.info("view is NULL, not yet disposed LoginPresenter?");
166 167
        }
167 168
    }
168 169

  

Also available in: Unified diff