Package com.aliucord

Class Logger

  • All Implemented Interfaces:

    
    public final class Logger
    
                        

    Logger that will log to both logcat and Discord's debug log

    • Constructor Detail

      • Logger

        Logger(String module)
        Parameters:
        module - Name of the module
    • Method Detail

      • info

         final Unit info(String msg, Throwable throwable)

        Logs a Log.INFO message and prints the stacktrace of the exception

        Parameters:
        msg - Message to log
        throwable - Exception to log
      • info

         final Unit info(String msg)

        Logs a Log.INFO message and prints the stacktrace of the exception

        Parameters:
        msg - Message to log
      • infoToast

         final Unit infoToast(String msg)

        Logs a Log.INFO message, and shows it to the user as a toast

        Parameters:
        msg - Message to log
      • warn

         final Unit warn(String msg, Throwable throwable)

        Logs a Log.WARN message and prints the stacktrace of the exception

        Parameters:
        msg - Message to log
        throwable - Exception to log
      • warn

         final Unit warn(String msg)

        Logs a Log.WARN message and prints the stacktrace of the exception

        Parameters:
        msg - Message to log
      • error

         final Unit error(Throwable throwable)

        Logs an exception

        Parameters:
        throwable - Exception to log
      • error

         final Unit error(String msg, Throwable throwable)

        Logs a Log.ERROR message and prints the stacktrace of the exception

        Parameters:
        msg - Message to log
        throwable - Exception to log
      • error

         final Unit error(Context ctx, Throwable throwable)

        Logs an exception and shows the user a toast saying "Sorry, something went wrong. Please try again."

        Parameters:
        throwable - Exception to log
      • errorToast

         final Unit errorToast(Throwable throwable)

        Logs an exception and shows the user a toast saying "Sorry, something went wrong. Please try again."

        Parameters:
        throwable - Exception to log
      • errorToast

         final Unit errorToast(String msg, Throwable throwable)

        Logs a Log.ERROR message, shows it to the user as a toast and prints the stacktrace of the exception

        Parameters:
        msg - Message to log
        throwable - Exception to log
      • errorToast

         final Unit errorToast(String msg)

        Logs a Log.ERROR message, shows it to the user as a toast and prints the stacktrace of the exception

        Parameters:
        msg - Message to log
      • errorToast

         final Unit errorToast(Context ctx, String msg, Throwable throwable)

        Logs a Log.ERROR message, shows it to the user as a toast and prints the stacktrace of the exception

        Parameters:
        msg - Message to log
        throwable - Exception to log
      • errorToast

         final Unit errorToast(Context ctx, String msg)

        Logs a Log.ERROR message, shows it to the user as a toast and prints the stacktrace of the exception

        Parameters:
        msg - Message to log