@ApplicationScoped
@Singleton
public class Log {
private static final String LOG_FILE = "CRMLog.txt";
private enum LogType {
INFO, WARNING, ERROR, DEBUG
}
private final Logger LOG;
private final FileHandler logFileHandler;
public Log() throws IOException {
LOG = Logger.getLogger(novatec.crm.framework.Resources.class.getName());
try {
logFileHandler = new FileHandler(LOG_FILE, true);
} catch (SecurityException e) {
e.printStackTrace();
System.err.println("[FATAL]: Could not initialize logger");