Class Log
- java.lang.Object
-
- com.couchbase.lite.internal.support.Log
-
public final class Log extends Object
Couchbase Lite Internal Log Utility.Log levels are as follows: e: internal errors that are unrecoverable w: internal errors that are recoverable; client errors that may not be recoverable i: essential state info and client errors that are probably recoverable v: used by core: please do not use in platform coded. d: low-level debugging information
-
-
Field Summary
Fields Modifier and Type Field Description static String
LOG_HEADER
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
d(LogDomain domain, String msg)
Send a DEBUG message.static void
d(LogDomain domain, String msg, Object... args)
Send a DEBUG message.static void
d(LogDomain domain, String msg, Throwable err)
Send a DEBUG message and log the exception.static void
d(LogDomain domain, String msg, Throwable err, Object... args)
Send a DEBUG message and log the exception.static void
e(LogDomain domain, String msg)
Send an ERROR message.static void
e(LogDomain domain, String msg, Object... args)
Send a ERROR message.static void
e(LogDomain domain, String msg, Throwable err)
Send a ERROR message and log the exception.static void
e(LogDomain domain, String msg, Throwable err, Object... args)
Send a ERROR message and log the exception.static String
formatStandardMessage(String msg, Object... args)
static String
getC4DomainForLoggingDomain(LogDomain domain)
static int
getC4LevelForLogLevel(LogLevel logLevel)
static LogDomain
getLoggingDomainForC4Domain(String c4Domain)
static LogLevel
getLogLevelForC4Level(int c4Level)
static void
i(LogDomain domain, String msg)
Send an INFO message.static void
i(LogDomain domain, String msg, Object... args)
Send an INFO message.static void
i(LogDomain domain, String msg, Throwable err)
Send a INFO message and log the exception.static void
i(LogDomain domain, String msg, Throwable err, Object... args)
Send a INFO message and log the exception.static void
info(LogDomain domain, String msg)
static void
info(LogDomain domain, String msg, Throwable err)
static void
initLogging()
static void
initLogging(Map<String,String> errorMessages)
Setup logging.static String
lookupStandardMessage(String msg)
static void
v(LogDomain domain, String msg)
Send a VERBOSE message.static void
v(LogDomain domain, String msg, Object... args)
Send a VERBOSE message.static void
v(LogDomain domain, String msg, Throwable err)
Send a VERBOSE message and log the exception.static void
v(LogDomain domain, String msg, Throwable err, Object... args)
Send a VERBOSE message and log the exception.static void
w(LogDomain domain, String msg)
Send a WARN message.static void
w(LogDomain domain, String msg, Object... args)
Send a WARN message.static void
w(LogDomain domain, String msg, Throwable err)
Send a WARN message and log the exception.static void
w(LogDomain domain, String msg, Throwable err, Object... args)
Send a WARN message and log the exception.static void
warn()
-
-
-
Field Detail
-
LOG_HEADER
public static final String LOG_HEADER
- See Also:
- Constant Field Values
-
-
Method Detail
-
initLogging
public static void initLogging(@NonNull Map<String,String> errorMessages)
Setup logging.
-
initLogging
public static void initLogging()
-
d
public static void d(@NonNull LogDomain domain, @NonNull String msg)
Send a DEBUG message.- Parameters:
domain
- The log domain.msg
- The message you would like logged.
-
d
public static void d(@NonNull LogDomain domain, @NonNull String msg, @Nullable Throwable err)
Send a DEBUG message and log the exception.- Parameters:
domain
- The log domain.msg
- The message you would like logged.err
- An exception to log
-
d
public static void d(@NonNull LogDomain domain, @NonNull String msg, Object... args)
Send a DEBUG message.- Parameters:
domain
- The log domain.msg
- The string you would like logged plus format specifiers.args
- Variable number of Object args to be used as params to formatString.
-
d
public static void d(@NonNull LogDomain domain, @NonNull String msg, @Nullable Throwable err, Object... args)
Send a DEBUG message and log the exception.- Parameters:
domain
- The log domain.msg
- The string you would like logged plus format specifiers.err
- An exception to logargs
- Variable number of Object args to be used as params to formatString.
-
v
public static void v(@NonNull LogDomain domain, @NonNull String msg)
Send a VERBOSE message. Please do not use verbose level logging- Parameters:
domain
- The log domain.msg
- The message you would like logged.
-
v
public static void v(@NonNull LogDomain domain, @NonNull String msg, @Nullable Throwable err)
Send a VERBOSE message and log the exception. Please do not use verbose level logging- Parameters:
domain
- The log domain.msg
- The message you would like logged.err
- An exception to log
-
v
public static void v(@NonNull LogDomain domain, @NonNull String msg, Object... args)
Send a VERBOSE message. Please do not use verbose level logging- Parameters:
domain
- The log domain.msg
- The string you would like logged plus format specifiers.args
- Variable number of Object args to be used as params to formatString.
-
v
public static void v(@NonNull LogDomain domain, @NonNull String msg, @Nullable Throwable err, Object... args)
Send a VERBOSE message and log the exception. Please do not use verbose level logging- Parameters:
domain
- The log domain.msg
- The string you would like logged plus format specifiers.err
- An exception to logargs
- Variable number of Object args to be used as params to formatString.
-
i
public static void i(@NonNull LogDomain domain, @NonNull String msg)
Send an INFO message.- Parameters:
domain
- The log domain.msg
- The message you would like logged.
-
i
public static void i(@NonNull LogDomain domain, @NonNull String msg, @Nullable Throwable err)
Send a INFO message and log the exception.- Parameters:
domain
- The log domain.msg
- The message you would like logged.err
- An exception to log
-
info
public static void info(@NonNull LogDomain domain, @NonNull String msg, @Nullable Throwable err)
-
i
public static void i(@NonNull LogDomain domain, @NonNull String msg, Object... args)
Send an INFO message.- Parameters:
domain
- The log domain.msg
- The string you would like logged plus format specifiers.args
- Variable number of Object args to be used as params to formatString.
-
i
public static void i(@NonNull LogDomain domain, @NonNull String msg, @Nullable Throwable err, Object... args)
Send a INFO message and log the exception.- Parameters:
domain
- The log domain.msg
- The string you would like logged plus format specifiers.err
- An exception to logargs
- Variable number of Object args to be used as params to formatString.
-
w
public static void w(@NonNull LogDomain domain, @NonNull String msg)
Send a WARN message.- Parameters:
domain
- The log domain.msg
- The message you would like logged.
-
w
public static void w(@NonNull LogDomain domain, @NonNull String msg, @Nullable Throwable err)
Send a WARN message and log the exception.- Parameters:
domain
- The log domain.msg
- The message you would like logged.err
- An exception to log
-
w
public static void w(@NonNull LogDomain domain, @NonNull String msg, Object... args)
Send a WARN message.- Parameters:
domain
- The log domain.msg
- The string you would like logged plus format specifiers.args
- Variable number of Object args to be used as params to formatString.
-
w
public static void w(@NonNull LogDomain domain, @NonNull String msg, @Nullable Throwable err, Object... args)
Send a WARN message and log the exception.- Parameters:
domain
- The log domain.msg
- The string you would like logged plus format specifiers.err
- An exception to logargs
- Variable number of Object args to be used as params to formatString.
-
e
public static void e(@NonNull LogDomain domain, @NonNull String msg)
Send an ERROR message.- Parameters:
domain
- The log domain.msg
- The message you would like logged.
-
e
public static void e(@NonNull LogDomain domain, @NonNull String msg, @Nullable Throwable err)
Send a ERROR message and log the exception.- Parameters:
domain
- The log domain.msg
- The message you would like logged.err
- An exception to log
-
e
public static void e(@NonNull LogDomain domain, @NonNull String msg, Object... args)
Send a ERROR message.- Parameters:
domain
- The log domain.msg
- The string you would like logged plus format specifiers.args
- Variable number of Object args to be used as params to formatString.
-
e
public static void e(@NonNull LogDomain domain, @NonNull String msg, @Nullable Throwable err, Object... args)
Send a ERROR message and log the exception.- Parameters:
domain
- The log domain.msg
- The string you would like logged plus format specifiers.err
- An exception to logargs
- Variable number of Object args to be used as params to formatString.
-
formatStandardMessage
@NonNull public static String formatStandardMessage(@Nullable String msg, @NonNull Object... args)
-
getLogLevelForC4Level
@NonNull public static LogLevel getLogLevelForC4Level(int c4Level)
-
getC4LevelForLogLevel
public static int getC4LevelForLogLevel(@NonNull LogLevel logLevel)
-
getC4DomainForLoggingDomain
@NonNull public static String getC4DomainForLoggingDomain(@NonNull LogDomain domain)
-
getLoggingDomainForC4Domain
@NonNull public static LogDomain getLoggingDomainForC4Domain(@NonNull String c4Domain)
-
warn
public static void warn()
-
-