Package com.couchbase.lite
Class ConsoleLogger
- java.lang.Object
-
- com.couchbase.lite.ConsoleLogger
-
-
Constructor Summary
Constructors Constructor Description ConsoleLogger()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
formatLog(LogLevel level, String domain, String message)
EnumSet<LogDomain>
getDomains()
Gets the domains that will be considered for writing to the console log.LogLevel
getLevel()
Gets the level that will be logged via this logger.static PrintStream
getLogStream(LogLevel level)
void
log(LogLevel level, LogDomain domain, String message)
Performs the actual logging logicvoid
setDomains(LogDomain... domains)
Sets the domains that will be considered for writing to the console log.void
setDomains(EnumSet<LogDomain> domains)
Sets the domains that will be considered for writing to the console log.void
setLevel(LogLevel level)
Sets the overall logging level that will be written to the console log.
-
-
-
Method Detail
-
getLogStream
@NonNull public static PrintStream getLogStream(@NonNull LogLevel level)
-
formatLog
@NonNull public static String formatLog(@NonNull LogLevel level, @NonNull String domain, @NonNull String message)
-
log
public void log(@NonNull LogLevel level, @NonNull LogDomain domain, @NonNull String message)
Description copied from interface:Logger
Performs the actual logging logic
-
getLevel
@NonNull public LogLevel getLevel()
Description copied from interface:Logger
Gets the level that will be logged via this logger.
-
setLevel
public void setLevel(@NonNull LogLevel level)
Sets the overall logging level that will be written to the console log.- Parameters:
level
- The lowest (most verbose) level to include in the logs
-
getDomains
@NonNull public EnumSet<LogDomain> getDomains()
Gets the domains that will be considered for writing to the console log.- Returns:
- The currently active domains
-
setDomains
public void setDomains(@NonNull EnumSet<LogDomain> domains)
Sets the domains that will be considered for writing to the console log.- Parameters:
domains
- The domains to make active
-
setDomains
public void setDomains(@NonNull LogDomain... domains)
Sets the domains that will be considered for writing to the console log.- Parameters:
domains
- The domains to make active (vararg)
-
-