Project

General

Profile

« Previous | Next » 

Revision 2663

Added by sgarg over 18 years ago

Replacing MetaCatUtil.debugMessage or MetaCatUtil.logMetacat call with logMetacat (private Logger object) call

View differences:

AuthSession.java
31 31
import javax.servlet.http.HttpSession;
32 32
import javax.servlet.http.HttpServletRequest;
33 33

  
34
import org.apache.log4j.Logger;
35

  
34 36
/**
35 37
 * A Class that implements session tracking for MetaCatServlet users.
36 38
 * User's login data are stored in the session object.
......
42 44
  private HttpSession session = null;
43 45
  private AuthInterface authService = null;
44 46
  private String statusMessage = null;
47
  private static Logger logMetacat = Logger.getLogger(AuthSession.class);
45 48

  
46 49
  /**
47 50
   * Construct an AuthSession
......
122 125

  
123 126
    // if it is still in use invalidate and get a new one
124 127
    if ( !session.isNew() ) {
125
      MetaCatUtil.logMetacat.info("in session is not new");
126
      MetaCatUtil.logMetacat.info("the old session id is : " +
128
      logMetacat.info("in session is not new");
129
      logMetacat.info("the old session id is : " +
127 130
                                session.getId());
128
      MetaCatUtil.logMetacat.info("the old session username : " +
131
      logMetacat.info("the old session username : " +
129 132
                                session.getAttribute("username"));
130 133
      session.invalidate();
131
      MetaCatUtil.logMetacat.info("in session is not new");
134
      logMetacat.info("in session is not new");
132 135
      session = request.getSession(true);
133 136
    }
134 137
    // store the username, password, and groupname (the first only)
......
139 142
    if ( groups.length > 0 ) {
140 143
      session.setAttribute("groupnames", groups);
141 144
    }
142
     MetaCatUtil.logMetacat.info("the new session id is : " +
145
     logMetacat.info("the new session id is : " +
143 146
                                session.getId());
144
     MetaCatUtil.logMetacat.info("the new session username : " +
147
     logMetacat.info("the new session username : " +
145 148
                                session.getAttribute("username"));
146 149
    return session;
147 150
  }

Also available in: Unified diff