VMware GemFire Java API Reference
Interface LogWriter
-
@Deprecated public interface LogWriterDeprecated.Please use Log4J2 instead.Defines methods available to clients that want to write a log message to their GemFire distributed system log file.Instances of this interface can be obtained by calling
DistributedSystem.getLogWriter().For any logged message the log file will contain:
- The message's level.
- The time the message was logged.
- The id of the thread that logged the message.
- The message itself which can be a string and/or an exception including the exception's stack trace.
A message always has a level. Logging levels are ordered. Enabling logging at a given level also enables logging at higher levels. The higher the level the more important and urgent the message.
The levels, in descending order, are:
severe(highest value) is a message level indicating a serious failure. In generalseveremessages should describe events that are of considerable importance and which will prevent normal program execution. They should be reasonably intelligible to end users and to information managers.errorIn generalerrormessages should describe events that are of considerable importance but will not prevent normal program execution. They should be reasonably intelligible to end users and to information managers. They are weaker thansevereand stronger thanwarning.warningis a message level indicating a potential problem. In generalwarningmessages should describe events that will be of interest to end users or information managers, or which indicate potential problems.infois a message level for informational messages. Typicallyinfomessages should be reasonably significant and should make sense to end users and system administrators.configis a message level for static configuration messages.configmessages are intended to provide a variety of static configuration information, to assist in debugging problems that may be associated with particular configurations.fineis a message level providing tracing information. In general thefinelevel should be used for information that will be broadly interesting to developers. This level is for the lowest volume, and most important, tracing messages.finerindicates a fairly detailed tracing message. Logging calls for entering, returning, or throwing an exception are traced at thefinerlevel.finest(lowest value) indicates a highly detailed tracing message. In general thefinestlevel should be used for the most voluminous detailed tracing messages.
For each level methods exist that will request a message, at that level, to be logged. These methods are all named after their level.
For each level a method exists that returns a boolean indicating if messages at that level will currently be logged. The names of these methods are of the form: level
Enabled.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidconfig(java.lang.String message)Deprecated.Writes a message to this writer.voidconfig(java.lang.String message, java.lang.Throwable throwable)Deprecated.Writes both a message and exception to this writer.voidconfig(java.lang.Throwable throwable)Deprecated.Writes an exception to this writer.booleanconfigEnabled()Deprecated.Returns true if "config" log messages are enabled.LogWriterI18nconvertToLogWriterI18n()Deprecated.A mechanism for accessing the abstraction layer used for internationalization.voidentering(java.lang.String sourceClass, java.lang.String sourceMethod)Deprecated.Log a method entry.voiderror(java.lang.String message)Deprecated.Writes a message to this writer.voiderror(java.lang.String message, java.lang.Throwable throwable)Deprecated.Writes both a message and exception to this writer.voiderror(java.lang.Throwable throwable)Deprecated.Writes an exception to this writer.booleanerrorEnabled()Deprecated.Returns true if "error" log messages are enabled.voidexiting(java.lang.String sourceClass, java.lang.String sourceMethod)Deprecated.Log a method return.voidfine(java.lang.String message)Deprecated.Writes a message to this writer.voidfine(java.lang.String message, java.lang.Throwable throwable)Deprecated.Writes both a message and exception to this writer.voidfine(java.lang.Throwable throwable)Deprecated.Writes an exception to this writer.booleanfineEnabled()Deprecated.Returns true if "fine" log messages are enabled.voidfiner(java.lang.String message)Deprecated.Writes a message to this writer.voidfiner(java.lang.String message, java.lang.Throwable throwable)Deprecated.Writes both a message and exception to this writer.voidfiner(java.lang.Throwable throwable)Deprecated.Writes an exception to this writer.booleanfinerEnabled()Deprecated.Returns true if "finer" log messages are enabled.voidfinest(java.lang.String message)Deprecated.Writes a message to this writer.voidfinest(java.lang.String message, java.lang.Throwable throwable)Deprecated.Writes both a message and exception to this writer.voidfinest(java.lang.Throwable throwable)Deprecated.Writes an exception to this writer.booleanfinestEnabled()Deprecated.Returns true if "finest" log messages are enabled.java.util.logging.HandlergetHandler()Deprecated.Returns a 1.4 logging handler that can be used to direct application output to this GemFire logger using the standard JDK logger APIs.voidinfo(java.lang.String message)Deprecated.Writes a message to this writer.voidinfo(java.lang.String message, java.lang.Throwable throwable)Deprecated.Writes both a message and exception to this writer.voidinfo(java.lang.Throwable throwable)Deprecated.Writes an exception to this writer.booleaninfoEnabled()Deprecated.Returns true if "info" log messages are enabled.voidsevere(java.lang.String message)Deprecated.Writes a message to this writer.voidsevere(java.lang.String message, java.lang.Throwable throwable)Deprecated.Writes both a message and exception to this writer.voidsevere(java.lang.Throwable throwable)Deprecated.Writes an exception to this writer.booleansevereEnabled()Deprecated.Returns true if "severe" log messages are enabled.voidthrowing(java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.Throwable thrown)Deprecated.Log throwing an exception.voidwarning(java.lang.String message)Deprecated.Writes a message to this writer.voidwarning(java.lang.String message, java.lang.Throwable throwable)Deprecated.Writes both a message and exception to this writer.voidwarning(java.lang.Throwable throwable)Deprecated.Writes an exception to this writer.booleanwarningEnabled()Deprecated.Returns true if "warning" log messages are enabled.
-
-
-
Method Detail
-
severeEnabled
boolean severeEnabled()
Deprecated.Returns true if "severe" log messages are enabled. Returns false if "severe" log messages are disabled.- Returns:
- whether "severe" log messages are enabled
-
severe
void severe(java.lang.String message, java.lang.Throwable throwable)Deprecated.Writes both a message and exception to this writer. The message level is "severe".- Parameters:
message- the message to logthrowable- the throwable to log
-
severe
void severe(java.lang.String message)
Deprecated.Writes a message to this writer. The message level is "severe".- Parameters:
message- the message to log
-
severe
void severe(java.lang.Throwable throwable)
Deprecated.Writes an exception to this writer. The exception level is "severe".- Parameters:
throwable- the throwable to log
-
errorEnabled
boolean errorEnabled()
Deprecated.Returns true if "error" log messages are enabled. Returns false if "error" log messages are disabled.- Returns:
- whether "error" log messages are enabled
-
error
void error(java.lang.String message, java.lang.Throwable throwable)Deprecated.Writes both a message and exception to this writer. The message level is "error".- Parameters:
message- the message to logthrowable- the throwable to log
-
error
void error(java.lang.String message)
Deprecated.Writes a message to this writer. The message level is "error".- Parameters:
message- the message to log
-
error
void error(java.lang.Throwable throwable)
Deprecated.Writes an exception to this writer. The exception level is "error".- Parameters:
throwable- the throwable to log
-
warningEnabled
boolean warningEnabled()
Deprecated.Returns true if "warning" log messages are enabled. Returns false if "warning" log messages are disabled.- Returns:
- whether "warning" log messages are enabled
-
warning
void warning(java.lang.String message, java.lang.Throwable throwable)Deprecated.Writes both a message and exception to this writer. The message level is "warning".- Parameters:
message- the message to logthrowable- the throwable to log
-
warning
void warning(java.lang.String message)
Deprecated.Writes a message to this writer. The message level is "warning".- Parameters:
message- the message to log
-
warning
void warning(java.lang.Throwable throwable)
Deprecated.Writes an exception to this writer. The exception level is "warning".- Parameters:
throwable- the throwable to log
-
infoEnabled
boolean infoEnabled()
Deprecated.Returns true if "info" log messages are enabled. Returns false if "info" log messages are disabled.- Returns:
- whether "info" log messages are enabled
-
info
void info(java.lang.String message, java.lang.Throwable throwable)Deprecated.Writes both a message and exception to this writer. The message level is "information".- Parameters:
message- the message to logthrowable- the throwable to log
-
info
void info(java.lang.String message)
Deprecated.Writes a message to this writer. The message level is "information".- Parameters:
message- the message to log
-
info
void info(java.lang.Throwable throwable)
Deprecated.Writes an exception to this writer. The exception level is "information".- Parameters:
throwable- the throwable to log
-
configEnabled
boolean configEnabled()
Deprecated.Returns true if "config" log messages are enabled. Returns false if "config" log messages are disabled.- Returns:
- whether "config" log messages are enabled
-
config
void config(java.lang.String message, java.lang.Throwable throwable)Deprecated.Writes both a message and exception to this writer. The message level is "config".- Parameters:
message- the message to logthrowable- the throwable to log
-
config
void config(java.lang.String message)
Deprecated.Writes a message to this writer. The message level is "config".- Parameters:
message- the message to log
-
config
void config(java.lang.Throwable throwable)
Deprecated.Writes an exception to this writer. The exception level is "config".- Parameters:
throwable- the throwable to log
-
fineEnabled
boolean fineEnabled()
Deprecated.Returns true if "fine" log messages are enabled. Returns false if "fine" log messages are disabled.- Returns:
- whether "fine" log message are enabled
-
fine
void fine(java.lang.String message, java.lang.Throwable throwable)Deprecated.Writes both a message and exception to this writer. The message level is "fine".- Parameters:
message- the message to logthrowable- the throwable to log
-
fine
void fine(java.lang.String message)
Deprecated.Writes a message to this writer. The message level is "fine".- Parameters:
message- the message to log
-
fine
void fine(java.lang.Throwable throwable)
Deprecated.Writes an exception to this writer. The exception level is "fine".- Parameters:
throwable- the throwable to log
-
finerEnabled
boolean finerEnabled()
Deprecated.Returns true if "finer" log messages are enabled. Returns false if "finer" log messages are disabled.- Returns:
- whether "finer" log messages are enabled
-
finer
void finer(java.lang.String message, java.lang.Throwable throwable)Deprecated.Writes both a message and exception to this writer. The message level is "finer".- Parameters:
message- the message to logthrowable- the throwable to log
-
finer
void finer(java.lang.String message)
Deprecated.Writes a message to this writer. The message level is "finer".- Parameters:
message- the message to log
-
finer
void finer(java.lang.Throwable throwable)
Deprecated.Writes an exception to this writer. The exception level is "finer".- Parameters:
throwable- the throwable to log
-
entering
void entering(java.lang.String sourceClass, java.lang.String sourceMethod)Deprecated.Log a method entry.The logging is done using the
finerlevel. The string message will start with"ENTRY"and include the class and method names.- Parameters:
sourceClass- Name of class that issued the logging request.sourceMethod- Name of the method that issued the logging request.
-
exiting
void exiting(java.lang.String sourceClass, java.lang.String sourceMethod)Deprecated.Log a method return.The logging is done using the
finerlevel. The string message will start with"RETURN"and include the class and method names.- Parameters:
sourceClass- Name of class that issued the logging request.sourceMethod- Name of the method that issued the logging request.
-
throwing
void throwing(java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.Throwable thrown)Deprecated.Log throwing an exception.Use to log that a method is terminating by throwing an exception. The logging is done using the
finerlevel.This is a convenience method that could be done instead by calling
finer(String, Throwable). The string message will start with"THROW"and include the class and method names.- Parameters:
sourceClass- Name of class that issued the logging request.sourceMethod- Name of the method that issued the logging request.thrown- The Throwable that is being thrown.
-
finestEnabled
boolean finestEnabled()
Deprecated.Returns true if "finest" log messages are enabled. Returns false if "finest" log messages are disabled.- Returns:
- whether "finest" leg messages are enabled
-
finest
void finest(java.lang.String message, java.lang.Throwable throwable)Deprecated.Writes both a message and exception to this writer. The message level is "finest".- Parameters:
message- the message to logthrowable- the throwable to log
-
finest
void finest(java.lang.String message)
Deprecated.Writes a message to this writer. The message level is "finest".- Parameters:
message- the message to log
-
finest
void finest(java.lang.Throwable throwable)
Deprecated.Writes an exception to this writer. The exception level is "finest".- Parameters:
throwable- the throwable to log
-
getHandler
java.util.logging.Handler getHandler()
Deprecated.Returns a 1.4 logging handler that can be used to direct application output to this GemFire logger using the standard JDK logger APIs. Each time this method is called it creates a new instance of a Handler so care should be taken to not call this method too often.- Returns:
- a 1.4 logging handler
-
convertToLogWriterI18n
LogWriterI18n convertToLogWriterI18n()
Deprecated.A mechanism for accessing the abstraction layer used for internationalization.- Returns:
- a
LogWriterI18n
-
-