public abstract class Logger
extends java.lang.Object
DefaultIdeaErrorLogger.canHandle(com.intellij.openapi.diagnostic.IdeaLoggingEvent)
for more details.
Note that in production, a call to "error" doesn't throw exceptions so the execution continues. In tests, however, an AssertionError
is thrown.
In most non-performance tests, debug level is enabled by default, so that when a test fails the full contents of its log are printed to stdout.Modifier and Type | Class and Description |
---|---|
static interface |
Logger.Factory |
Constructor and Description |
---|
Logger() |
Modifier and Type | Method and Description |
---|---|
boolean |
assertTrue(boolean value) |
boolean |
assertTrue(boolean value,
java.lang.Object message) |
protected static java.lang.Throwable |
checkException(java.lang.Throwable t) |
abstract void |
debug(java.lang.String message) |
void |
debug(java.lang.String message,
java.lang.Object... details) |
abstract void |
debug(java.lang.String message,
java.lang.Throwable t) |
abstract void |
debug(java.lang.Throwable t) |
void |
error(java.lang.Object message) |
void |
error(java.lang.String message) |
void |
error(java.lang.String message,
Attachment... attachments) |
void |
error(java.lang.String message,
java.lang.String... details) |
void |
error(java.lang.String message,
java.lang.Throwable t) |
void |
error(java.lang.String message,
java.lang.Throwable t,
Attachment... attachments) |
abstract void |
error(java.lang.String message,
java.lang.Throwable t,
java.lang.String... details) |
void |
error(java.lang.Throwable t) |
static Logger.Factory |
getFactory() |
static Logger |
getInstance(java.lang.Class cl) |
static Logger |
getInstance(java.lang.String category) |
abstract void |
info(java.lang.String message) |
abstract void |
info(java.lang.String message,
java.lang.Throwable t) |
void |
info(java.lang.Throwable t) |
abstract boolean |
isDebugEnabled() |
static boolean |
isInitialized() |
boolean |
isTraceEnabled() |
static void |
setFactory(java.lang.Class<? extends Logger.Factory> factory) |
static void |
setFactory(Logger.Factory factory) |
abstract void |
setLevel(Level level) |
void |
trace(java.lang.String message)
Log a message with 'trace' level which finer-grained than 'debug' level.
|
void |
trace(java.lang.Throwable t) |
void |
warn(java.lang.String message) |
abstract void |
warn(java.lang.String message,
java.lang.Throwable t) |
void |
warn(java.lang.Throwable t) |
public static void setFactory(java.lang.Class<? extends Logger.Factory> factory)
public static void setFactory(Logger.Factory factory)
public static Logger.Factory getFactory()
public static boolean isInitialized()
public static Logger getInstance(java.lang.String category)
public static Logger getInstance(java.lang.Class cl)
public abstract boolean isDebugEnabled()
public abstract void debug(java.lang.String message)
public abstract void debug(java.lang.Throwable t)
public abstract void debug(java.lang.String message, java.lang.Throwable t)
public void debug(java.lang.String message, java.lang.Object... details)
public boolean isTraceEnabled()
public void trace(java.lang.String message)
debug(String)
for internal
events of a subsystem to avoid overwhelming the log if 'debug' level is enabled.public void trace(java.lang.Throwable t)
public void info(java.lang.Throwable t)
public abstract void info(java.lang.String message)
public abstract void info(java.lang.String message, java.lang.Throwable t)
public void warn(java.lang.String message)
public void warn(java.lang.Throwable t)
public abstract void warn(java.lang.String message, java.lang.Throwable t)
public void error(java.lang.String message)
public void error(java.lang.Object message)
public void error(java.lang.String message, Attachment... attachments)
public void error(java.lang.String message, java.lang.Throwable t, Attachment... attachments)
public void error(java.lang.String message, java.lang.String... details)
public void error(java.lang.String message, java.lang.Throwable t)
public void error(java.lang.Throwable t)
public abstract void error(java.lang.String message, java.lang.Throwable t, java.lang.String... details)
public boolean assertTrue(boolean value, java.lang.Object message)
public boolean assertTrue(boolean value)
public abstract void setLevel(Level level)
protected static java.lang.Throwable checkException(java.lang.Throwable t)