2
I set up the Logger
in my main class.
public static final Logger LOGGER = Logger.getLogger(DashBoard.class.getName());
and I’m using it this way:
LOGGER.log(Level.SEVERE, "Error occur in FileHandler.", exception);
However now I wanted to use the same log file in other classes.
It’s good practice to use the Logger
in this way?
--> config.class
// devido a ter definido como static tenho acesso nas outras classes deste modo
DashBoard.LOGGER.log(Level.INFO, "Loading... FxmlQualidade.fxml");