Class MyLogger


  • public final class MyLogger
    extends Object
    Helper-class to provice logging methods which can be configured in ConfigurationLoggigDialog and uses translations provided by LocalizeController.
    • Method Detail

      • getInstance

        public static MyLogger getInstance()
      • logIfIsDebug

        public void logIfIsDebug​(String message)
      • logging

        public void logging​(MyLogger.ILogType logType,
                            String message)
                     throws Exception
        Creates a log file as configured, if it is not disabled.
        Parameters:
        logType - = Enum from MyLogger-Class. Describes the type of the log.
        message - = Describes the content of the log file
        Throws:
        Exception
      • logging

        public void logging​(MyLogger.ILogType logType,
                            String message,
                            @Nullable
                            SQLDatabase db)
                     throws Exception
        Creates a log file as configured, if it is not disabled.
        Parameters:
        logType - = Enum from MyLogger-Class. Describes the type of the log.
        message - = Describes the content of the log file
        db - = Describes the database which was being used, can also be null, if the log is not SQL / HQL!
        Throws:
        Exception
      • log

        public boolean log​(String filename,
                           MyLogger.Time time,
                           String message)
                    throws Exception
        Logs the given message and save it into the given filename.
        Time determines the interval if a new file needs to be created or reuse a existing one.
        It will also be used for the files name at the end.
        Parameters:
        filename -
        time -
        message -
        Returns:
        Throws:
        Exception