Click or drag to resize
Log Class

Note: This API is now obsolete.

Defines methods available to clients that want to write a log message to their GemFire system's shared log file.
Inheritance Hierarchy
SystemObject
  GemStone.GemFire.CacheLog

Namespace: GemStone.GemFire.Cache
Assembly: Gemstone.Gemfire.Cache (in Gemstone.Gemfire.Cache.dll) Version: 9.0.6.18
Syntax
[ObsoleteAttribute("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
public static class Log

The Log type exposes the following members.

Methods
  NameDescription
Public methodStatic memberClose
Closes logging facility (until next init).
Public methodStatic memberConfig
Config level logging with variable number of arguments using format as in System.String.Format.
Public methodStatic memberDebug
Debug level logging with variable number of arguments using format as in System.String.Format.
Public methodStatic memberEnabled
True if log messages at the given level are enabled.
Public methodStatic memberError
Error level logging with variable number of arguments using format as in System.String.Format.
Public methodStatic memberFine
Fine level logging with variable number of arguments using format as in System.String.Format.
Public methodStatic memberFiner
Finer level logging with variable number of arguments using format as in System.String.Format.
Public methodStatic memberFinest
Finest level logging with variable number of arguments using format as in System.String.Format.
Public methodStatic memberInfo
Info level logging with variable number of arguments using format as in System.String.Format.
Public methodStatic memberInit(LogLevel, String)
Initializes the logging facility with the given level and filename.
Public methodStatic memberInit(LogLevel, String, Int32)
Initializes logging facility with given level, filename, and file size limit.
Public methodStatic memberLevel
Returns the current log level.
Public methodStatic memberLogCatch
Logs both a message and a caught exception.
Public methodStatic memberLogFileName
Returns the name of the current log file. NOTE: This function is for debugging only, as it is not completely thread-safe!
Public methodStatic memberLogThrow
Logs both a message and a thrown exception.
Public methodStatic memberSetLevel
Sets the current log level.
Public methodStatic memberWarning
Warning level logging with variable number of arguments using format as in System.String.Format.
Public methodStatic memberWrite
Logs a message at the given level.
Top
Remarks
Any attempt to use an instance after its connection is disconnected will throw a NotConnectedException.

For any logged message the log file will contain:

  • The message's log level.
  • The time the message was logged.
  • The ID of the connection and thread that logged the message.
  • The message itself, perhaps with 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 of severity, are:

  • Error (highest severity) is a message level indicating a serious failure. In general error messages 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 system administrators.
  • Warning is a message level indicating a potential problem. In general warning messages should describe events that will be of interest to end users or system managers, or which indicate potential problems.
  • Info is a message level for informational messages. Typically info messages should be reasonably significant and should make sense to end users and system administrators.
  • Config is a message level for static configuration messages. config messages are intended to provide a variety of static configuration information, to assist in debugging problems that may be associated with particular configurations.
  • Fine is a message level providing tracing information. In general the fine level should be used for information that will be broadly interesting to developers. This level is for the lowest volume, and most important, tracing messages.
  • Finer indicates a moderately detailed tracing message. This is an intermediate level between fine and finest.
  • Finest indicates a very detailed tracing message. Logging calls for entering, returning, or throwing an exception are traced at the finest level.
  • Debug (lowest severity) indicates a highly detailed tracing message. In general the debug level should be used for the most voluminous detailed tracing messages.

See Also