BAEL-3921: Remove adding a redundant log handler (#8881)
This commit is contained in:
parent
fa97ab6c43
commit
932eba6929
@ -19,8 +19,8 @@ public class User {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static User createWithLoggedInstantiationTime(String name, String email, String country) {
|
public static User createWithLoggedInstantiationTime(String name, String email, String country) {
|
||||||
setLoggerProperties();
|
|
||||||
LOGGER.log(Level.INFO, "Creating User instance at : {0}", LocalTime.now());
|
LOGGER.log(Level.INFO, "Creating User instance at : {0}", LocalTime.now());
|
||||||
|
|
||||||
return new User(name, email, country);
|
return new User(name, email, country);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,11 +53,4 @@ public class User {
|
|||||||
public String getCountry() {
|
public String getCountry() {
|
||||||
return country;
|
return country;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void setLoggerProperties() {
|
|
||||||
ConsoleHandler handler = new ConsoleHandler();
|
|
||||||
handler.setLevel(Level.INFO);
|
|
||||||
handler.setFormatter(new SimpleFormatter());
|
|
||||||
LOGGER.addHandler(handler);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user