Enum NullLogManager
- java.lang.Object
-
- java.lang.Enum<NullLogManager>
-
- org.sosy_lab.common.log.NullLogManager
-
- All Implemented Interfaces:
Serializable,Comparable<NullLogManager>,LogManager
@Deprecated public enum NullLogManager extends Enum<NullLogManager> implements LogManager
Deprecated.UseLogManager.createNullLogManager()instead. This class will be made package-private.LogManagerimplementation that does not log anything.Note: Do not use this implementation for unit tests, use
TestLogManagerinstead.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCEDeprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidflush()Deprecated.Flush all handlers of this logger.static LogManagergetInstance()Deprecated.voidlog(Level pPriority, Object... pArgs)Deprecated.Logs any message occurring during program execution.voidlog(Level pPriority, Supplier<String> pMsgSupplier)Deprecated.Logs any message occurring during program execution.voidlogDebugException(Throwable pE)Deprecated.Log an exception solely for the purpose of debugging.voidlogDebugException(Throwable pE, String pAdditionalMessage)Deprecated.Log an exception solely for the purpose of debugging.voidlogException(Level pPriority, Throwable pE, String pAdditionalMessage)Deprecated.Log an exception by printing the full details to the user.voidlogf(Level pPriority, String pFormat, Object... pArgs)Deprecated.Logs any message occurring during program execution.voidlogfDebugException(Throwable pE, String pFormat, Object... pArgs)Deprecated.Log an exception solely for the purpose of debugging.voidlogfException(Level pPriority, Throwable pE, String pFormat, Object... pArgs)Deprecated.Log an exception by printing the full details to the user.voidlogfUserException(Level pPriority, Throwable pE, String pFormat, Object... pArgs)Deprecated.Log a message by printing its message to the user.voidlogUserException(Level pPriority, Throwable pE, String pAdditionalMessage)Deprecated.Log a message by printing its message to the user.static NullLogManagervalueOf(String name)Deprecated.Returns the enum constant of this type with the specified name.static NullLogManager[]values()Deprecated.Returns an array containing the constants of this enum type, in the order they are declared.LogManagerwithComponentName(String pName)Deprecated.Returns a new LogManager instance which may use the given name as an indicator from which component a log message comes from.booleanwouldBeLogged(Level pPriority)Deprecated.Returns true if a message with the given log level would be logged.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final NullLogManager INSTANCE
Deprecated.
-
-
Method Detail
-
values
public static NullLogManager[] values()
Deprecated.Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (NullLogManager c : NullLogManager.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NullLogManager valueOf(String name)
Deprecated.Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getInstance
public static LogManager getInstance()
Deprecated.
-
withComponentName
public LogManager withComponentName(String pName)
Deprecated.Description copied from interface:LogManagerReturns a new LogManager instance which may use the given name as an indicator from which component a log message comes from.- Specified by:
withComponentNamein interfaceLogManager- Parameters:
pName- A non-empty string.- Returns:
- A LogManager instance.
-
wouldBeLogged
public boolean wouldBeLogged(Level pPriority)
Deprecated.Description copied from interface:LogManagerReturns true if a message with the given log level would be logged.- Specified by:
wouldBeLoggedin interfaceLogManager- Parameters:
pPriority- the log level- Returns:
- whether this log level is enabled
-
log
public void log(Level pPriority, Object... pArgs)
Deprecated.Description copied from interface:LogManagerLogs any message occurring during program execution. The message is constructed lazily by concatenating the parts with " ". The caller should not use string concatenation to create the message in order to increase performance if the message is never logged. To make individual arguments lazy, useMoreStrings.lazyString(Supplier).- Specified by:
login interfaceLogManager- Parameters:
pPriority- the log level for the messagepArgs- the parts of the message (can be an arbitrary number of objects whoseObject.toString()method is called)
-
log
public void log(Level pPriority, Supplier<String> pMsgSupplier)
Deprecated.Description copied from interface:LogManagerLogs any message occurring during program execution. The message is constructed lazily by asking the provided supplier if necessary.- Specified by:
login interfaceLogManager- Parameters:
pPriority- the log level for the messagepMsgSupplier- a supplier for a non-null log message
-
logf
public void logf(Level pPriority, String pFormat, Object... pArgs)
Deprecated.Description copied from interface:LogManagerLogs any message occurring during program execution. The message is constructed lazily fromString.format(format, args). To make individual arguments lazy, useMoreStrings.lazyString(Supplier).- Specified by:
logfin interfaceLogManager- Parameters:
pPriority- the log level for the messagepFormat- The format string.pArgs- The arguments for the format string.
-
logUserException
public void logUserException(Level pPriority, Throwable pE, String pAdditionalMessage)
Deprecated.Description copied from interface:LogManagerLog a message by printing its message to the user. The details (e.g., stack trace) are hidden from the user and logged with a lower log level.Use this method in cases where an expected exception with a useful error message is thrown, e.g. an InvalidConfigurationException.
If you want to log an IOException because of a write error, it is recommended to write the message like "Could not write FOO to file". The final message will then be "Could not write FOO to file FOO.txt (REASON)".
- Specified by:
logUserExceptionin interfaceLogManager- Parameters:
pPriority- the log level for the messagepE- the occurred exceptionpAdditionalMessage- an optional message
-
logfUserException
public void logfUserException(Level pPriority, Throwable pE, String pFormat, Object... pArgs)
Deprecated.Description copied from interface:LogManagerLog a message by printing its message to the user. The details (e.g., stack trace) are hidden from the user and logged with a lower log level.Use this method in cases where an expected exception with a useful error message is thrown, e.g. an InvalidConfigurationException.
The message is constructed lazily from
String.format(format, args). To make individual arguments lazy, useMoreStrings.lazyString(Supplier).If you want to log an IOException because of a write error, it is recommended to write the message like "Could not write FOO to file". The final message will then be "Could not write FOO to file FOO.txt (REASON)".
- Specified by:
logfUserExceptionin interfaceLogManager- Parameters:
pPriority- the log level for the messagepE- the occurred exceptionpFormat- The format string.pArgs- The arguments for the format string.
-
logDebugException
public void logDebugException(Throwable pE, String pAdditionalMessage)
Deprecated.Description copied from interface:LogManagerLog an exception solely for the purpose of debugging. In default configuration, this exception is not shown to the user!Use this method when you want to log an exception that was handled by the catching site, but you don't want to forget the information completely.
- Specified by:
logDebugExceptionin interfaceLogManager- Parameters:
pE- the occurred exceptionpAdditionalMessage- an optional message
-
logfDebugException
public void logfDebugException(Throwable pE, String pFormat, Object... pArgs)
Deprecated.Description copied from interface:LogManagerLog an exception solely for the purpose of debugging. In default configuration, this exception is not shown to the user!Use this method when you want to log an exception that was handled by the catching site, but you don't want to forget the information completely.
The message is constructed lazily from
String.format(format, args). To make individual arguments lazy, useMoreStrings.lazyString(Supplier).- Specified by:
logfDebugExceptionin interfaceLogManager- Parameters:
pE- the occurred exceptionpFormat- The format string.pArgs- The arguments for the format string.
-
logDebugException
public void logDebugException(Throwable pE)
Deprecated.Description copied from interface:LogManagerLog an exception solely for the purpose of debugging. In default configuration, this exception is not shown to the user!Use this method when you want to log an exception that was handled by the catching site, but you don't want to forget the information completely.
- Specified by:
logDebugExceptionin interfaceLogManager- Parameters:
pE- the occurred exception
-
logException
public void logException(Level pPriority, Throwable pE, String pAdditionalMessage)
Deprecated.Description copied from interface:LogManagerLog an exception by printing the full details to the user.This method should only be used in cases where logUserException and logDebugException are not acceptable.
- Specified by:
logExceptionin interfaceLogManager- Parameters:
pPriority- the log level for the messagepE- the occurred exceptionpAdditionalMessage- an optional message
-
logfException
public void logfException(Level pPriority, Throwable pE, String pFormat, Object... pArgs)
Deprecated.Description copied from interface:LogManagerLog an exception by printing the full details to the user.This method should only be used in cases where logUserException and logDebugException are not acceptable.
The message is constructed lazily from
String.format(format, args). To make individual arguments lazy, useMoreStrings.lazyString(Supplier).- Specified by:
logfExceptionin interfaceLogManager- Parameters:
pPriority- the log level for the messagepE- the occurred exceptionpFormat- The format string.pArgs- The arguments for the format string.
-
flush
public void flush()
Deprecated.Description copied from interface:LogManagerFlush all handlers of this logger.- Specified by:
flushin interfaceLogManager
-
-