Class Log


  • public class Log
    extends Object
    Super simple library for super easy console logging
    Author:
    m4schini MIT License Copyright (c) 2019 Malte Schink (malteschink.de)
    • Constructor Detail

      • Log

        public Log()
    • Method Detail

      • enableLog

        public static void enableLog​(boolean enable)
        Turn logging to console on or off
        Parameters:
        enable - true = on | false = off
      • status

        public static void status​(Object input)
        Prints input with timestamp
        Parameters:
        input - content of console output
      • success

        public static void success​(Object input)
        Prints input in green with timestamp
        Parameters:
        input - content of console output
      • error

        public static void error​(Object input)
        Prints input in red with timestamp and "Error: " at the start
        Parameters:
        input - content of console output
      • warning

        public static void warning​(Object input)
        Prints input in yelloq with timestamp and "Warning: " at the start
        Parameters:
        input - content of console output
      • critical

        public static void critical​(Object input)
        Prints input with red background, timestamp and "CRITICAL: " at the start
        Parameters:
        input - content of console output
      • exception

        public static void exception​(Exception exception)
        Prints error, location and cause
        Parameters:
        exception - thrown exception
      • divide

        public static void divide()
        Prints dashed line to console
      • setTimestampPattern

        public static void setTimestampPattern​(String pattern)
      • loading

        public static void loading​(int part)
        Prints a loadingbar to console. You can have a maximun of 10 10%-steps. If you have to abort the loading process input -1 or you have to print \n before the next line of output
        Parameters:
        part - 0-10 = 10% Steps | -1 = abort