java.lang.Object
com.intellij.openapi.diagnostic.Logger
- Direct Known Subclasses:
DefaultLogger
A standard interface to write to %system%/log/idea.log (or %system%/testlog/idea.log in tests).
In addition to writing to log file, "error" methods result in showing "IDE fatal errors" dialog in the IDE,
in EAP versions or if "idea.fatal.error.notification" system property is "true" (). See
com.intellij.diagnostic.DefaultIdeaErrorLogger#canHandle 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.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanassertTrue(boolean value) booleanassertTrue(boolean value, @Nullable Object message) voidabstract voidabstract voidabstract voidvoidvoidvoidabstract voidstatic Logger.Factorystatic @NotNull LoggergetInstance(@NotNull Class cl) static @NotNull LoggergetInstance(@NotNull String category) voidabstract voidabstract voidabstract booleanstatic booleanbooleanstatic voidsetFactory(@NotNull Class<? extends Logger.Factory> factory) voidvoidLog a message with 'trace' level which finer-grained than 'debug' level.voidvoidabstract void
-
Constructor Details
-
Logger
public Logger()
-
-
Method Details
-
setFactory
-
getFactory
-
isInitialized
public static boolean isInitialized() -
getInstance
-
getInstance
-
isDebugEnabled
public abstract boolean isDebugEnabled() -
debug
-
debug
-
debug
-
debug
-
isTraceEnabled
public boolean isTraceEnabled() -
trace
Log a message with 'trace' level which finer-grained than 'debug' level. Use this method instead ofdebug(String)for internal events of a subsystem to avoid overwhelming the log if 'debug' level is enabled. -
trace
-
info
-
info
-
info
-
warn
-
warn
-
warn
-
error
-
error
-
error
-
error
-
assertTrue
@Contract("false,_->fail") public boolean assertTrue(boolean value, @Nullable @Nullable Object message) -
assertTrue
@Contract("false->fail") public boolean assertTrue(boolean value)
-