]> git.mxchange.org Git - jcore.git/blobdiff - src/org/mxchange/jcore/BaseFrameworkSystem.java
Removed dependency to log4j and commons
[jcore.git] / src / org / mxchange / jcore / BaseFrameworkSystem.java
index 960f3569a09023c0b74532110c27fc8dcddc8c3c..55974363b91fabf96eacc6f22f3ae274ad62beb5 100644 (file)
  */
 package org.mxchange.jcore;
 
-import java.text.MessageFormat;
-import java.util.Arrays;
 import java.util.ResourceBundle;
 import java.util.StringTokenizer;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
 import org.mxchange.jcore.application.Application;
 import org.mxchange.jcore.client.Client;
 import org.mxchange.jcore.manager.Manageable;
@@ -44,11 +40,6 @@ public abstract class BaseFrameworkSystem implements FrameworkInterface {
         */
        private static FrameworkInterface selfInstance;
 
-       /**
-        * Class' logger
-        */
-       private final Logger LOG;
-
        /**
         * Application instance
         */
@@ -73,9 +64,6 @@ public abstract class BaseFrameworkSystem implements FrameworkInterface {
         * Initialize object
         */
        {
-               // Init logger
-               this.LOG = LogManager.getLogger(this);
-
                // Need to set it here
                selfInstance = this;
        }
@@ -106,12 +94,6 @@ public abstract class BaseFrameworkSystem implements FrameworkInterface {
                return this.client;
        }
 
-       @Override
-       public void logException (final Throwable exception) {
-               // Log this exception
-               this.getLogger().catching(exception);
-       }
-
        /**
         * Converts null to empty string or leaves original object untouched.
         * <p>
@@ -120,18 +102,12 @@ public abstract class BaseFrameworkSystem implements FrameworkInterface {
         * class
         */
        protected Object convertNullToEmpty (final Object object) {
-               // Trace message
-               this.getLogger().trace(MessageFormat.format("object={0}", object)); //NOI18N
-
                // Is it null?
                if (null == object) {
                        // Return empty string
                        return ""; //NOI18N
                }
 
-               // Trace message
-               this.getLogger().trace(MessageFormat.format("object={0} - EXIT!", object)); //NOI18N
-
                // Return it
                return object;
        }
@@ -145,9 +121,6 @@ public abstract class BaseFrameworkSystem implements FrameworkInterface {
         * Move to own utility class
         */
        protected String[] getArrayFromString (final String str, final String delimiter) {
-               // Trace message
-               this.getLogger().trace(MessageFormat.format("str={0},delimiter={1} - CALLED!", str, delimiter)); //NOI18N
-
                // Get tokenizer
                StringTokenizer tokenizer = new StringTokenizer(str, delimiter);
 
@@ -160,16 +133,10 @@ public abstract class BaseFrameworkSystem implements FrameworkInterface {
                        // Get current token and add it
                        tokens[index] = tokenizer.nextToken();
 
-                       // Debug message
-                       this.getLogger().debug(MessageFormat.format("Token at index{0}: {1}", index, tokens[1])); //NOI18N
-
                        // Increment index
                        index++;
                }
 
-               // Trace message
-               this.getLogger().trace(MessageFormat.format("tokens({0})={1} - EXIT!", tokens.length, Arrays.toString(tokens))); //NOI18N
-
                // Return it
                return tokens;
        }
@@ -230,19 +197,6 @@ public abstract class BaseFrameworkSystem implements FrameworkInterface {
                return this.getBundle().getString(key);
        }
 
-       /**
-        * Aborts program with given exception
-        * <p>
-        * @param throwable Any type of Throwable
-        */
-       protected void abortProgramWithException (final Throwable throwable) {
-               // Log exception ...
-               this.logException(throwable);
-
-               // .. and exit
-               System.exit(1);
-       }
-
        /**
         * Getter for bundle instance
         * <p>
@@ -261,22 +215,10 @@ public abstract class BaseFrameworkSystem implements FrameworkInterface {
                BaseFrameworkSystem.bundle = bundle;
        }
 
-       /**
-        * Getter for logger instance
-        * <p>
-        * @return Logger instance
-        */
-       protected Logger getLogger () {
-               return this.LOG;
-       }
-
        /**
         * Initializes i18n bundles
         */
        protected void initBundle () {
-               // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
-
                // Is the bundle set?
                if (BaseFrameworkSystem.isBundledInitialized()) {
                        // Is already set
@@ -285,9 +227,6 @@ public abstract class BaseFrameworkSystem implements FrameworkInterface {
 
                // Set instance
                setBundle(ResourceBundle.getBundle(FrameworkInterface.I18N_BUNDLE_FILE)); // NOI18N
-
-               // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
        }
 
        /**