Package com.android.utils
Interface ILogger
-
- All Known Subinterfaces:
IReaderLogger
- All Known Implementing Classes:
NullLogger,StdLogger
public interface ILoggerInterface used to display warnings/errors while parsing the SDK content.
There are a few default implementations available:-
NullLoggeris an implementation that does nothing with the log. Useful for limited cases where you need to call a class that requires a non-null logging yet the calling code does not have any mean of reporting logs itself. It can be acceptable for use as a temporary implementation but most of the time that means the caller code needs to be reworked to take a logger object from its own caller. -
StdLoggeris an implementation that dumps the log toSystem.outorSystem.err. This is useful for unit tests or code that does not have any GUI. GUI based apps based should not use it and should provide a better way to report to the user.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voiderror(java.lang.Throwable t, java.lang.String msgFormat, java.lang.Object... args)Prints an error message.voidinfo(java.lang.String msgFormat, java.lang.Object... args)Prints an information message.default voidlifecycle(java.lang.String msgFormat, java.lang.Object... args)Prints a progress information message.default voidquiet(java.lang.String msgFormat, java.lang.Object... args)Prints an important information message.voidverbose(java.lang.String msgFormat, java.lang.Object... args)Prints a verbose message.voidwarning(java.lang.String msgFormat, java.lang.Object... args)Prints a warning message.
-
-
-
Method Detail
-
error
void error(@Nullable java.lang.Throwable t, @Nullable java.lang.String msgFormat, java.lang.Object... args)Prints an error message.- Parameters:
t- is an optionalThrowableorException. If non-null, its message will be printed out.msgFormat- is an optional error format. If non-null, it will be printed using aFormatterwith the provided arguments.args- provides the arguments for errorFormat.
-
warning
void warning(@NonNull java.lang.String msgFormat, java.lang.Object... args)Prints a warning message.- Parameters:
msgFormat- is a string format to be used with aFormatter. Cannot be null.args- provides the arguments for warningFormat.
-
quiet
default void quiet(@NonNull java.lang.String msgFormat, java.lang.Object... args)Prints an important information message. Defaults to info, but mapped to quiet in the Android Gradle Plugin.- Parameters:
msgFormat- is a string format to be used with aFormatter. Cannot be null.args- provides the arguments for msgFormat.
-
lifecycle
default void lifecycle(@NonNull java.lang.String msgFormat, java.lang.Object... args)Prints a progress information message. Defaults to info, but mapped to lifecycle in the Android Gradle Plugin.- Parameters:
msgFormat- is a string format to be used with aFormatter. Cannot be null.args- provides the arguments for msgFormat.
-
info
void info(@NonNull java.lang.String msgFormat, java.lang.Object... args)Prints an information message.- Parameters:
msgFormat- is a string format to be used with aFormatter. Cannot be null.args- provides the arguments for msgFormat.
-
verbose
void verbose(@NonNull java.lang.String msgFormat, java.lang.Object... args)Prints a verbose message.- Parameters:
msgFormat- is a string format to be used with aFormatter. Cannot be null.args- provides the arguments for msgFormat.
-
-