class LoggingService {

    public static void logError(String moduleName, String msg, Throwable e) {
        if (newSentryException(e)) {
            Sentry.getContext().addExtra("version", getVersion());
            Sentry.getStoredClient().getContext().setUser(new User(System.getProperty("user.name"), System.getProperty("user.name"), "", ""));
            Sentry.capture(e);
        }

        if (Configuration.debugging || logger == null) {
            System.out.println(String.format("%s %s : %s (%s) - Exception: %s - Stack trace: %s", Thread.currentThread().getName(), moduleName, msg, new Date(System.currentTimeMillis()), e.getMessage(), ExceptionUtils.getStackTrace(e)));
        } else {
            logger.logp(Level.SEVERE, Thread.currentThread().getName(), moduleName, msg, e);
        }
    }

    private  LoggingService();

}