public class udac {
private PasswordService passwordservice;
+ private final static Logger logger = Logger.getLogger(udac.class
+ .getCanonicalName());
public udac(PasswordService passwordservice) {
this.passwordservice = passwordservice;
user.setValid(true);
return user;
}
- System.out
- .println("Sorry, you are not a registered user! Please sign up first "
+ getLogger().info(
+ "Sorry, you are not a registered user! Please sign up first "
+ searchQuery);
} catch (Exception ex) {
- Logger.getLogger(this.getClass().getCanonicalName()).severe(
- "Log in failed");
+ getLogger().severe("Log in failed");
ex.printStackTrace();
}
// some exception handling
}
return null;
}
+
+ Logger getLogger() {
+ return udac.logger;
+ }
}