Package org.altbeacon.beacon.logging
Class LogManager
- java.lang.Object
-
- org.altbeacon.beacon.logging.LogManager
-
public final class LogManager extends Object
Manager for logging in the Altbeacon library. The default is aLoggers.warningLogger()()}.- Since:
- 2.2
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidd(String tag, String message, Object... args)Send a debug log message to the logger.static voidd(Throwable t, String tag, String message, Object... args)Send a debug log message to the logger.static voide(String tag, String message, Object... args)Send a error log message to the logger.static voide(Throwable t, String tag, String message, Object... args)Send a error log message to the logger.static LoggergetLogger()Gets the currently set loggerstatic voidi(String tag, String message, Object... args)Send a info log message to the logger.static voidi(Throwable t, String tag, String message, Object... args)Send a info log message to the logger.static booleanisVerboseLoggingEnabled()Indicates whether verbose logging is enabled.static voidsetLogger(Logger logger)Set the logger that the Altbeacon library will use to send it's log messages to.static voidsetVerboseLoggingEnabled(boolean enabled)Sets whether verbose logging is enabled.static voidv(String tag, String message, Object... args)Send a verbose log message to the logger.static voidv(Throwable t, String tag, String message, Object... args)Send a verbose log message to the logger.static voidw(String tag, String message, Object... args)Send a warning log message to the logger.static voidw(Throwable t, String tag, String message, Object... args)Send a warning log message to the logger.
-
-
-
Method Detail
-
setLogger
public static void setLogger(Logger logger)
Set the logger that the Altbeacon library will use to send it's log messages to.- Parameters:
logger- The logger implementation that logs will be sent to for logging.- Throws:
NullPointerException- if logger is null.- See Also:
Logger,Loggers
-
getLogger
public static Logger getLogger()
Gets the currently set logger- Returns:
- logger
- See Also:
Logger
-
isVerboseLoggingEnabled
public static boolean isVerboseLoggingEnabled()
Indicates whether verbose logging is enabled. If not, expensive calculations to create log strings should be avoided.- Returns:
-
setVerboseLoggingEnabled
public static void setVerboseLoggingEnabled(boolean enabled)
Sets whether verbose logging is enabled. If not, expensive calculations to create log strings should be avoided.- Parameters:
enabled-
-
v
public static void v(String tag, String message, Object... args)
Send a verbose log message to the logger.- Parameters:
tag- Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.message- The message you would like logged. This message may contain string formatting which will be replaced with values from args.args- Arguments for string formatting.
-
v
public static void v(Throwable t, String tag, String message, Object... args)
Send a verbose log message to the logger.- Parameters:
tag- Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.message- The message you would like logged. This message may contain string formatting which will be replaced with values from args.t- An exception to log.args- Arguments for string formatting.
-
d
public static void d(String tag, String message, Object... args)
Send a debug log message to the logger.- Parameters:
tag- Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.message- The message you would like logged. This message may contain string formatting which will be replaced with values from args.args- Arguments for string formatting.
-
d
public static void d(Throwable t, String tag, String message, Object... args)
Send a debug log message to the logger.- Parameters:
tag- Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.message- The message you would like logged. This message may contain string formatting which will be replaced with values from args.t- An exception to log.args- Arguments for string formatting.
-
i
public static void i(String tag, String message, Object... args)
Send a info log message to the logger.- Parameters:
tag- Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.message- The message you would like logged. This message may contain string formatting which will be replaced with values from args.args- Arguments for string formatting.
-
i
public static void i(Throwable t, String tag, String message, Object... args)
Send a info log message to the logger.- Parameters:
tag- Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.message- The message you would like logged. This message may contain string formatting which will be replaced with values from args.t- An exception to log.args- Arguments for string formatting.
-
w
public static void w(String tag, String message, Object... args)
Send a warning log message to the logger.- Parameters:
tag- Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.message- The message you would like logged. This message may contain string formatting which will be replaced with values from args.args- Arguments for string formatting.
-
w
public static void w(Throwable t, String tag, String message, Object... args)
Send a warning log message to the logger.- Parameters:
tag- Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.message- The message you would like logged. This message may contain string formatting which will be replaced with values from args.t- An exception to log.args- Arguments for string formatting.
-
e
public static void e(String tag, String message, Object... args)
Send a error log message to the logger.- Parameters:
tag- Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.message- The message you would like logged. This message may contain string formatting which will be replaced with values from args.args- Arguments for string formatting.
-
e
public static void e(Throwable t, String tag, String message, Object... args)
Send a error log message to the logger.- Parameters:
tag- Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.message- The message you would like logged. This message may contain string formatting which will be replaced with values from args.t- An exception to log.args- Arguments for string formatting.
-
-