GemFire 7.0

com.gemstone.gemfire.i18n
Interface LogWriterI18n


public interface LogWriterI18n

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:

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:

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: levelEnabled.


Method Summary
 void config(StringId msgID)
          Writes a message to this writer.
 void config(StringId msgID, Object param)
          Writes a message to this writer.
 void config(StringId msgID, Object[] params)
          Writes a message to this writer.
 void config(StringId msgID, Object[] params, Throwable ex)
          Writes both a message and exception to this writer.
 void config(StringId msgID, Object param, Throwable ex)
          Writes both a message and exception to this writer.
 void config(StringId msgID, Throwable ex)
          Writes both a message and exception to this writer.
 void config(Throwable ex)
          Writes an exception to this writer.
 boolean configEnabled()
           
 LogWriter convertToLogWriter()
          A mechanism for accessing the abstraction layer used for a plain logger.
 void entering(String sourceClass, String sourceMethod)
          Log a method entry.
 void error(StringId msgID)
          Writes a message to this writer.
 void error(StringId msgID, Object param)
          Writes a message to this writer.
 void error(StringId msgID, Object[] params)
          Writes a message to this writer.
 void error(StringId msgID, Object[] params, Throwable ex)
          Writes both a message and exception to this writer.
 void error(StringId msgID, Object param, Throwable ex)
          Writes both a message and exception to this writer.
 void error(StringId msgID, Throwable ex)
          Writes both a message and exception to this writer.
 void error(Throwable ex)
          Writes an exception to this writer.
 boolean errorEnabled()
           
 void exiting(String sourceClass, String sourceMethod)
          Log a method return.
 void fine(String msg)
          Writes a message to this writer.
 void fine(String msg, Throwable ex)
          Writes both a message and exception to this writer.
 void fine(Throwable ex)
          Writes an exception to this writer.
 boolean fineEnabled()
           
 void finer(String msg)
          Writes a message to this writer.
 void finer(String msg, Throwable ex)
          Writes both a message and exception to this writer.
 void finer(Throwable ex)
          Writes an exception to this writer.
 boolean finerEnabled()
           
 void finest(String msg)
          Writes a message to this writer.
 void finest(String msg, Throwable ex)
          Writes both a message and exception to this writer.
 void finest(Throwable ex)
          Writes an exception to this writer.
 boolean finestEnabled()
           
 Handler getHandler()
          Returns a 1.4 logging handler that can be used to direct application output to this GemFire logger using the standard JDK logger APIs.
 void info(StringId msgID)
          Writes a message to this writer.
 void info(StringId msgID, Object param)
          Writes a message to this writer.
 void info(StringId msgID, Object[] params)
          Writes a message to this writer.
 void info(StringId msgID, Object[] params, Throwable ex)
          Writes both a message and exception to this writer.
 void info(StringId msgID, Object param, Throwable ex)
          Writes both a message and exception to this writer.
 void info(StringId msgID, Throwable ex)
          Writes both a message and exception to this writer.
 void info(Throwable ex)
          Writes an exception to this writer.
 boolean infoEnabled()
           
 void severe(StringId msgID)
          Writes a message to this writer.
 void severe(StringId msgID, Object param)
          Writes a message to this writer.
 void severe(StringId msgID, Object[] params)
          Writes a message to this writer.
 void severe(StringId msgID, Object[] params, Throwable ex)
          Writes both a message and exception to this writer.
 void severe(StringId msgID, Object param, Throwable ex)
          Writes both a message and exception to this writer.
 void severe(StringId msgID, Throwable ex)
          Writes both a message and exception to this writer.
 void severe(Throwable ex)
          Writes an exception to this writer.
 boolean severeEnabled()
           
 void throwing(String sourceClass, String sourceMethod, Throwable thrown)
          Log throwing an exception.
 void warning(StringId msgID)
          Writes a message to this writer.
 void warning(StringId msgID, Object param)
          Writes a message to this writer.
 void warning(StringId msgID, Object[] params)
          Writes a message to this writer.
 void warning(StringId msgID, Object[] params, Throwable ex)
          Writes both a message and exception to this writer.
 void warning(StringId msgID, Object param, Throwable ex)
          Writes both a message and exception to this writer.
 void warning(StringId msgID, Throwable ex)
          Writes both a message and exception to this writer.
 void warning(Throwable ex)
          Writes an exception to this writer.
 boolean warningEnabled()
           
 

Method Detail

severeEnabled

boolean severeEnabled()
Returns:
true if "severe" log messages are enabled.

severe

void severe(Throwable ex)
Writes an exception to this writer. The exception level is "severe".


severe

void severe(StringId msgID,
            Object[] params,
            Throwable ex)
Writes both a message and exception to this writer. The message level is "severe".

Since:
6.0

severe

void severe(StringId msgID,
            Object param,
            Throwable ex)
Writes both a message and exception to this writer. The message level is "severe".

Since:
6.0

severe

void severe(StringId msgID,
            Throwable ex)
Writes both a message and exception to this writer. The message level is "severe".

Since:
6.0

severe

void severe(StringId msgID,
            Object[] params)
Writes a message to this writer. The message level is "severe".

Since:
6.0

severe

void severe(StringId msgID,
            Object param)
Writes a message to this writer. The message level is "severe".

Since:
6.0

severe

void severe(StringId msgID)
Writes a message to this writer. The message level is "severe".

Since:
6.0

errorEnabled

boolean errorEnabled()
Returns:
true if "error" log messages are enabled.

error

void error(Throwable ex)
Writes an exception to this writer. The exception level is "error".


error

void error(StringId msgID,
           Object[] params,
           Throwable ex)
Writes both a message and exception to this writer. The message level is "error".

Since:
6.0

error

void error(StringId msgID,
           Object param,
           Throwable ex)
Writes both a message and exception to this writer. The message level is "error".

Since:
6.0

error

void error(StringId msgID,
           Throwable ex)
Writes both a message and exception to this writer. The message level is "error".

Since:
6.0

error

void error(StringId msgID,
           Object[] params)
Writes a message to this writer. The message level is "error".

Since:
6.0

error

void error(StringId msgID,
           Object param)
Writes a message to this writer. The message level is "error".

Since:
6.0

error

void error(StringId msgID)
Writes a message to this writer. The message level is "error".

Since:
6.0

warningEnabled

boolean warningEnabled()
Returns:
true if "warning" log messages are enabled.

warning

void warning(Throwable ex)
Writes an exception to this writer. The exception level is "warning".


warning

void warning(StringId msgID,
             Object[] params,
             Throwable ex)
Writes both a message and exception to this writer. The message level is "warning".

Since:
6.0

warning

void warning(StringId msgID,
             Object param,
             Throwable ex)
Writes both a message and exception to this writer. The message level is "warning".

Since:
6.0

warning

void warning(StringId msgID,
             Throwable ex)
Writes both a message and exception to this writer. The message level is "warning".

Since:
6.0

warning

void warning(StringId msgID,
             Object[] params)
Writes a message to this writer. The message level is "warning".

Since:
6.0

warning

void warning(StringId msgID,
             Object param)
Writes a message to this writer. The message level is "warning".

Since:
6.0

warning

void warning(StringId msgID)
Writes a message to this writer. The message level is "warning".

Since:
6.0

infoEnabled

boolean infoEnabled()
Returns:
true if "info" log messages are enabled.

info

void info(Throwable ex)
Writes an exception to this writer. The exception level is "information".


info

void info(StringId msgID,
          Object[] params,
          Throwable ex)
Writes both a message and exception to this writer. The message level is "info".

Since:
6.0

info

void info(StringId msgID,
          Object param,
          Throwable ex)
Writes both a message and exception to this writer. The message level is "info".

Since:
6.0

info

void info(StringId msgID,
          Throwable ex)
Writes both a message and exception to this writer. The message level is "info".

Since:
6.0

info

void info(StringId msgID,
          Object[] params)
Writes a message to this writer. The message level is "info".

Since:
6.0

info

void info(StringId msgID,
          Object param)
Writes a message to this writer. The message level is "info".

Since:
6.0

info

void info(StringId msgID)
Writes a message to this writer. The message level is "info".

Since:
6.0

configEnabled

boolean configEnabled()
Returns:
true if "config" log messages are enabled.

config

void config(Throwable ex)
Writes an exception to this writer. The exception level is "config".


config

void config(StringId msgID,
            Object[] params,
            Throwable ex)
Writes both a message and exception to this writer. The message level is "config".

Since:
6.0

config

void config(StringId msgID,
            Object param,
            Throwable ex)
Writes both a message and exception to this writer. The message level is "config".

Since:
6.0

config

void config(StringId msgID,
            Throwable ex)
Writes both a message and exception to this writer. The message level is "config".

Since:
6.0

config

void config(StringId msgID,
            Object[] params)
Writes a message to this writer. The message level is "config".

Since:
6.0

config

void config(StringId msgID,
            Object param)
Writes a message to this writer. The message level is "config".

Since:
6.0

config

void config(StringId msgID)
Writes a message to this writer. The message level is "config".

Since:
6.0

fineEnabled

boolean fineEnabled()
Returns:
true if "fine" log messages are enabled.

fine

void fine(String msg,
          Throwable ex)
Writes both a message and exception to this writer. The message level is "fine".


fine

void fine(String msg)
Writes a message to this writer. The message level is "fine".


fine

void fine(Throwable ex)
Writes an exception to this writer. The exception level is "fine".


finerEnabled

boolean finerEnabled()
Returns:
true if "finer" log messages are enabled.

finer

void finer(String msg,
           Throwable ex)
Writes both a message and exception to this writer. The message level is "finer".


finer

void finer(String msg)
Writes a message to this writer. The message level is "finer".


finer

void finer(Throwable ex)
Writes an exception to this writer. The exception level is "finer".


entering

void entering(String sourceClass,
              String sourceMethod)
Log a method entry.

The logging is done using the finer level. 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(String sourceClass,
             String sourceMethod)
Log a method return.

The logging is done using the finer level. 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(String sourceClass,
              String sourceMethod,
              Throwable thrown)
Log throwing an exception.

Use to log that a method is terminating by throwing an exception. The logging is done using the finer level.

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()
Returns:
true if "finest" log messages are enabled.

finest

void finest(String msg,
            Throwable ex)
Writes both a message and exception to this writer. The message level is "finest".


finest

void finest(String msg)
Writes a message to this writer. The message level is "finest".


finest

void finest(Throwable ex)
Writes an exception to this writer. The exception level is "finest".


getHandler

Handler getHandler()
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.


convertToLogWriter

LogWriter convertToLogWriter()
A mechanism for accessing the abstraction layer used for a plain logger.

Returns:
LogWriter

GemFire 7.0

Copyright © 1997-2012 VMware, Inc. All rights reserved.