java.lang.Object
me.wiefferink.interactivemessenger.Log

public class Log extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    Log()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    error​(Object... message)
    Print an error to the console
    static void
    errorIndent​(int indent, Object... message)
    Print a string indented with a certain number of spaces
    static void
    errorIndent​(int indent, Collection<String> lines)
    Print a list of strings to the output with indentation
    static Object[]
    indent​(int depth, Object... message)
    Indent a message
    static void
    info​(Object... message)
    Print an information message to the console
    static void
    infoIndent​(int indent, Object... message)
    Print a string indented with a certain number of spaces
    static void
    infoIndent​(int indent, Collection<String> lines)
    Print a list of strings to the output with indentation
    static void
    setLogger​(Logger newLogger)
    Set the logger
    static void
    warn​(Object... message)
    Print a warning to the console
    static void
    warnIndent​(int indent, Object... message)
    Print a string indented with a certain number of spaces
    static void
    warnIndent​(int indent, Collection<String> lines)
    Print a list of strings to the output with indentation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Log

      public Log()
  • Method Details

    • setLogger

      public static void setLogger(Logger newLogger)
      Set the logger
      Parameters:
      newLogger - Logger to use
    • info

      public static void info(Object... message)
      Print an information message to the console
      Parameters:
      message - The message to print
    • warn

      public static void warn(Object... message)
      Print a warning to the console
      Parameters:
      message - The message to print
    • error

      public static void error(Object... message)
      Print an error to the console
      Parameters:
      message - The message to print
    • indent

      public static Object[] indent(int depth, Object... message)
      Indent a message
      Parameters:
      depth - Number of indents to add, one indent is two spaces
      message - Message to indent
      Returns:
      Original message with requested number of indents added
    • infoIndent

      public static void infoIndent(int indent, Object... message)
      Print a string indented with a certain number of spaces
      Parameters:
      indent - The number of indents (each indent is 2 spaces)
      message - Message to print (will be split on newline to apply indentation)
    • infoIndent

      public static void infoIndent(int indent, Collection<String> lines)
      Print a list of strings to the output with indentation
      Parameters:
      indent - The number of indents (each indent is 2 spaces)
      lines - The string to print (will be split on newline to apply indentation)
    • warnIndent

      public static void warnIndent(int indent, Object... message)
      Print a string indented with a certain number of spaces
      Parameters:
      indent - The number of indents (each indent is 2 spaces)
      message - Message to print (will be split on newline to apply indentation)
    • warnIndent

      public static void warnIndent(int indent, Collection<String> lines)
      Print a list of strings to the output with indentation
      Parameters:
      indent - The number of indents (each indent is 2 spaces)
      lines - The string to print (will be split on newline to apply indentation)
    • errorIndent

      public static void errorIndent(int indent, Object... message)
      Print a string indented with a certain number of spaces
      Parameters:
      indent - The number of indents (each indent is 2 spaces)
      message - Message to print (will be split on newline to apply indentation)
    • errorIndent

      public static void errorIndent(int indent, Collection<String> lines)
      Print a list of strings to the output with indentation
      Parameters:
      indent - The number of indents (each indent is 2 spaces)
      lines - The string to print (will be split on newline to apply indentation)