public final class ALog
extends java.lang.Object
ALogConfiguration
instance which should be passed to
initialize(ALogConfiguration)
. In most cases ALog should be initialized once in
Application.onCreate()
method. If it won't be initialized explicitly, it will be
initialized on the first log method call with default configuration.Modifier and Type | Method and Description |
---|---|
static void |
d()
Sends empty
ALogLevel.DEBUG logging message. |
static void |
d(java.lang.String message,
java.lang.Object... args)
Sends
ALogLevel.DEBUG logging message. |
static void |
d(java.lang.Throwable throwable)
Sends
ALogLevel.DEBUG logging message. |
static void |
d(java.lang.Throwable throwable,
java.lang.String message,
java.lang.Object... args)
Sends
ALogLevel.DEBUG logging message. |
static void |
e()
Sends empty
ALogLevel.ERROR logging message. |
static void |
e(java.lang.String message,
java.lang.Object... args)
Sends
ALogLevel.ERROR logging message. |
static void |
e(java.lang.Throwable throwable)
Sends
ALogLevel.ERROR logging message. |
static void |
e(java.lang.Throwable throwable,
java.lang.String message,
java.lang.Object... args)
Sends
ALogLevel.ERROR logging message. |
static void |
i()
Sends empty
ALogLevel.INFO logging message. |
static void |
i(java.lang.String message,
java.lang.Object... args)
Sends
ALogLevel.INFO logging message. |
static void |
i(java.lang.Throwable throwable)
Sends
ALogLevel.INFO logging message. |
static void |
i(java.lang.Throwable throwable,
java.lang.String message,
java.lang.Object... args)
Sends
ALogLevel.INFO logging message. |
static void |
initialize(ALogConfiguration configuration)
Initializes
ALog with configuration. |
static void |
json(ALogLevel level,
java.lang.String json)
Formats JSON string and sends logging message with it.
|
static void |
json(java.lang.String json)
Formats JSON string and sends logging message with it.
|
static ALogger |
st(int stackTraceLineCount)
Gets
ALogger instance which outputs specified count of stack trace lines with
logging messages. |
static ALogger |
t(java.lang.String tag)
Gets
ALogger instance with specified log tag. |
static ALogger |
tst(java.lang.String tag,
int stackTraceLineCount)
Gets
ALogger instance which outputs specified count of stack trace lines with
logging messages and uses specified log tag. |
static void |
v()
Sends empty
ALogLevel.VERBOSE logging message. |
static void |
v(java.lang.String message,
java.lang.Object... args)
Sends
ALogLevel.VERBOSE logging message. |
static void |
v(java.lang.Throwable throwable)
Sends
ALogLevel.VERBOSE logging message. |
static void |
v(java.lang.Throwable throwable,
java.lang.String message,
java.lang.Object... args)
Sends
ALogLevel.VERBOSE logging message. |
static void |
w()
Sends empty
ALogLevel.WARNING logging message. |
static void |
w(java.lang.String message,
java.lang.Object... args)
Sends
ALogLevel.WARNING logging message. |
static void |
w(java.lang.Throwable throwable)
Sends
ALogLevel.WARNING logging message. |
static void |
w(java.lang.Throwable throwable,
java.lang.String message,
java.lang.Object... args)
Sends
ALogLevel.WARNING logging message. |
static void |
wtf()
Sends empty
ALogLevel.WTF logging message. |
static void |
wtf(java.lang.String message,
java.lang.Object... args)
Sends
ALogLevel.WTF logging message. |
static void |
wtf(java.lang.Throwable throwable)
Sends
ALogLevel.WTF logging message. |
static void |
wtf(java.lang.Throwable throwable,
java.lang.String message,
java.lang.Object... args)
Sends
ALogLevel.WTF logging message. |
static void |
xml(ALogLevel level,
java.lang.String xml)
Formats XML string and sends logging message with it.
|
static void |
xml(java.lang.String xml)
Formats XML string and sends logging message with it.
|
public static void initialize(ALogConfiguration configuration)
ALog
with configuration. In most cases it should be called once in
Application.onCreate()
method.configuration
- ALogConfiguration
instance. If null ALog
is inialized
with default configuration.public static ALogger t(java.lang.String tag)
ALogger
instance with specified log tag.tag
- Log tag.ALogger
instance with specified log tag.public static ALogger st(int stackTraceLineCount)
ALogger
instance which outputs specified count of stack trace lines with
logging messages.stackTraceLineCount
- Count of stack trace lines to output with logging messages.ALogger
instance which outputs specified count of stack trace lines with
logging messages.public static ALogger tst(java.lang.String tag, int stackTraceLineCount)
ALogger
instance which outputs specified count of stack trace lines with
logging messages and uses specified log tag.tag
- Log tag.stackTraceLineCount
- Count of stack trace lines to output with logging messages.ALogger
instance which outputs specified count of stack trace lines with
logging messages and uses specified log tag.public static void v()
ALogLevel.VERBOSE
logging message.public static void v(java.lang.String message, java.lang.Object... args)
ALogLevel.VERBOSE
logging message.message
- Message. Can be a format string.args
- Arguments for format string in message.public static void v(java.lang.Throwable throwable)
ALogLevel.VERBOSE
logging message.throwable
- Throwable
to log.public static void v(java.lang.Throwable throwable, java.lang.String message, java.lang.Object... args)
ALogLevel.VERBOSE
logging message.throwable
- Throwable
to log.message
- Message. Can be a format string.args
- Arguments for format string in message.public static void d()
ALogLevel.DEBUG
logging message.public static void d(java.lang.String message, java.lang.Object... args)
ALogLevel.DEBUG
logging message.message
- Message. Can be a format string.args
- Arguments for format string in message.public static void d(java.lang.Throwable throwable)
ALogLevel.DEBUG
logging message.throwable
- Throwable
to log.public static void d(java.lang.Throwable throwable, java.lang.String message, java.lang.Object... args)
ALogLevel.DEBUG
logging message.throwable
- Throwable
to log.message
- Message. Can be a format string.args
- Arguments for format string in message.public static void i()
ALogLevel.INFO
logging message.public static void i(java.lang.String message, java.lang.Object... args)
ALogLevel.INFO
logging message.message
- Message. Can be a format string.args
- Arguments for format string in message.public static void i(java.lang.Throwable throwable)
ALogLevel.INFO
logging message.throwable
- Throwable
to log.public static void i(java.lang.Throwable throwable, java.lang.String message, java.lang.Object... args)
ALogLevel.INFO
logging message.throwable
- Throwable
to log.message
- Message. Can be a format string.args
- Arguments for format string in message.public static void w()
ALogLevel.WARNING
logging message.public static void w(java.lang.String message, java.lang.Object... args)
ALogLevel.WARNING
logging message.message
- Message. Can be a format string.args
- Arguments for format string in message.public static void w(java.lang.Throwable throwable)
ALogLevel.WARNING
logging message.throwable
- Throwable
to log.public static void w(java.lang.Throwable throwable, java.lang.String message, java.lang.Object... args)
ALogLevel.WARNING
logging message.throwable
- Throwable
to log.message
- Message. Can be a format string.args
- Arguments for format string in message.public static void e()
ALogLevel.ERROR
logging message.public static void e(java.lang.String message, java.lang.Object... args)
ALogLevel.ERROR
logging message.message
- Message. Can be a format string.args
- Arguments for format string in message.public static void e(java.lang.Throwable throwable)
ALogLevel.ERROR
logging message.throwable
- Throwable
to log.public static void e(java.lang.Throwable throwable, java.lang.String message, java.lang.Object... args)
ALogLevel.ERROR
logging message.throwable
- Throwable
to log.message
- Message. Can be a format string.args
- Arguments for format string in message.public static void wtf()
ALogLevel.WTF
logging message.public static void wtf(java.lang.String message, java.lang.Object... args)
ALogLevel.WTF
logging message.message
- Message. Can be a format string.args
- Arguments for format string in message.public static void wtf(java.lang.Throwable throwable)
ALogLevel.WTF
logging message.throwable
- Throwable
to log.public static void wtf(java.lang.Throwable throwable, java.lang.String message, java.lang.Object... args)
ALogLevel.WTF
logging message.throwable
- Throwable
to log.message
- Message. Can be a format string.args
- Arguments for format string in message.public static void json(java.lang.String json)
ALogConfiguration
.json
- JSON string.public static void json(ALogLevel level, java.lang.String json)
json
- JSON string.level
- Logging level. See ALogLevel
.public static void xml(java.lang.String xml)
ALogConfiguration
.xml
- XML string.