public class

Log

extends Object
java.lang.Object
   ↳ com.neomades.util.Log

Class Overview

Console logger.

  • iOS: Use XCode console
  • Android: Use Logcat to see logs

Summary

Public Methods
static void debug(Object message)
Adds a string to the console buffer.
static void error(Throwable throwable)
Sends a message string with the ERROR level including the stack trace of the Throwable t passed as parameter.
static void error(Object message, Throwable throwable)
Sends a message string with the LOG_ERROR level including the stack trace of the Throwable t passed as parameter.
static void error(Object message)
Sends an error log message.
static void info(Object message)
Sends an information log message.
static boolean isEnabled()
Checks whether if logs are enabled.
static void setEnabled(boolean enabled)
Enables or not logs.
static void warn(Object message)
Sends a warning log message.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static void debug (Object message)

Adds a string to the console buffer.

Parameters
message string to add

public static void error (Throwable throwable)

Sends a message string with the ERROR level including the stack trace of the Throwable t passed as parameter.

Parameters
throwable the exception to log.

public static void error (Object message, Throwable throwable)

Sends a message string with the LOG_ERROR level including the stack trace of the Throwable t passed as parameter.

See error(Object) for more detailed information.

Parameters
message the logged message.
throwable the exception to log.

public static void error (Object message)

Sends an error log message.

Parameters
message the logged message

public static void info (Object message)

Sends an information log message.

Parameters
message the logged message

public static boolean isEnabled ()

Checks whether if logs are enabled.

Returns
  • if logs are enabled.

public static void setEnabled (boolean enabled)

Enables or not logs.

Parameters
enabled true for enabling logs

public static void warn (Object message)

Sends a warning log message.

Parameters
message the logged message