1.2 Logger - Auropol/Bluemint GitHub Wiki

Logger class that can be found at ´me.auropol.bluemint.util´ package serves the purpose of logging console outputs and outputing to console.

  • Methods

  • log (static LoggerHelper field) is an internal field that isn't ment to use outside of this class.

  • wrappers (Wrappers field) is also an internal field that isn't ment to use outside of this class.

  • manage() (Logger method) is a static access method to non-static methods in the class.

  • info(String args, Thread thread), warn(String args, Thread thread), critical(String args, Thread thread) and debug(String args, Thread thread) (void methods) are ment to use as console outputers that assign every output to a Logger thread.

  • log() (void method) catchs all the console outputs made by Logger class to a .txt file.

Firstly, import the Logger class by typing import me.auropol.bluemint.util.Logger;

Now, if we would want to use those methods, we firstly need to create a new thread by calling the Thread class:

final Thread thread = new Thread() {

    @Override

    public String name() {

        return "MYPROJECT";

    }

};

Then, we just call the console outputer by typing Logger.manage() and the method you want use, fe. warn("You use a deprecated api", thread), then you can catch these outputs made by the Logger class by typing Logger.manage().log() that will create a new text file with all the outputs made by Logger class.

And that's it. Visit more pages for more info about Bluemint project and Bluemint's methods and classes.