- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
public void notificationSuccess(String operation) {
Logger.getLogger(this.getClass().getName()).log(Level.INFO, "Operation " + operation + " success");
FacesMessage msg = null;
msg = new FacesMessage(FacesMessage.SEVERITY_INFO, "Notification", "Success");
FacesContext.getCurrentInstance().addMessage(null, msg);
}
public void notificationError(Exception e, String operation) {
Logger.getLogger(this.getClass().getName()).log(Level.ERROR, "Operation " + operation + " Error ", e);
FacesMessage msg = null;
msg = new FacesMessage(FacesMessage.SEVERITY_INFO, "Notification", "Error");
FacesContext.getCurrentInstance().addMessage(null, msg);
}
А не созавать ли мне новый экземпляр логгера при каждом уведомлении...