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 StringLOG_HEADER
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidd(LogDomain domain, String msg)Send a DEBUG message.static voidd(LogDomain domain, String msg, Object... args)Send a DEBUG message.static voidd(LogDomain domain, String msg, Throwable err)Send a DEBUG message and log the exception.static voidd(LogDomain domain, String msg, Throwable err, Object... args)Send a DEBUG message and log the exception.static voide(LogDomain domain, String msg)Send an ERROR message.static voide(LogDomain domain, String msg, Object... args)Send a ERROR message.static voide(LogDomain domain, String msg, Throwable err)Send a ERROR message and log the exception.static voide(LogDomain domain, String msg, Throwable err, Object... args)Send a ERROR message and log the exception.static StringformatStandardMessage(String msg, Object... args)static StringgetC4DomainForLoggingDomain(LogDomain domain)static intgetC4LevelForLogLevel(LogLevel logLevel)static LogDomaingetLoggingDomainForC4Domain(String c4Domain)static LogLevelgetLogLevelForC4Level(int c4Level)static voidi(LogDomain domain, String msg)Send an INFO message.static voidi(LogDomain domain, String msg, Object... args)Send an INFO message.static voidi(LogDomain domain, String msg, Throwable err)Send a INFO message and log the exception.static voidi(LogDomain domain, String msg, Throwable err, Object... args)Send a INFO message and log the exception.static voidinfo(LogDomain domain, String msg)static voidinfo(LogDomain domain, String msg, Throwable err)static voidinitLogging()static voidinitLogging(Map<String,String> errorMessages)Setup logging.static StringlookupStandardMessage(String msg)static voidv(LogDomain domain, String msg)Send a VERBOSE message.static voidv(LogDomain domain, String msg, Object... args)Send a VERBOSE message.static voidv(LogDomain domain, String msg, Throwable err)Send a VERBOSE message and log the exception.static voidv(LogDomain domain, String msg, Throwable err, Object... args)Send a VERBOSE message and log the exception.static voidw(LogDomain domain, String msg)Send a WARN message.static voidw(LogDomain domain, String msg, Object... args)Send a WARN message.static voidw(LogDomain domain, String msg, Throwable err)Send a WARN message and log the exception.static voidw(LogDomain domain, String msg, Throwable err, Object... args)Send a WARN message and log the exception.static voidwarn()
-
-
-
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()
-
-