VMware Tanzu GemFire Native .NET Reference  10.1.5
Apache::Geode::Client::Log Class Reference

Defines methods available to clients that want to write a log message to their Geode system's shared log file. More...

Static Public Member Functions

static void Close ()
 Closes logging facility (until next init). More...
 
static void Config (String^ format,... array< Object^>^ args)
 Config level logging with variable number of arguments using format as in System.String.Format. More...
 
static void Debug (String^ format,... array< Object^>^ args)
 Debug level logging with variable number of arguments using format as in System.String.Format. More...
 
static bool Enabled (LogLevel level)
 True if log messages at the given level are enabled. More...
 
static void Error (String^ format,... array< Object^>^ args)
 Error level logging with variable number of arguments using format as in System.String.Format. More...
 
static void Fine (String^ format,... array< Object^>^ args)
 Fine level logging with variable number of arguments using format as in System.String.Format. More...
 
static void Finer (String^ format,... array< Object^>^ args)
 Finer level logging with variable number of arguments using format as in System.String.Format. More...
 
static void Finest (String^ format,... array< Object^>^ args)
 Finest level logging with variable number of arguments using format as in System.String.Format. More...
 
static void Info (String^ format,... array< Object^>^ args)
 Info level logging with variable number of arguments using format as in System.String.Format. More...
 
static void Init (LogLevel level, String^ logFileName)
 Initializes the logging facility with the given level and filename. More...
 
static void Init (LogLevel level, String^ logFileName, System::Int32 logFileLimit)
 Initializes logging facility with given level, filename, and file size limit. More...
 
static LogLevel Level ()
 Returns the current log level. More...
 
static void LogCatch (LogLevel level, String^ msg, System::Exception^ ex)
 Logs both a message and a caught exception. More...
 
static void LogThrow (LogLevel level, String^ msg, System::Exception^ ex)
 Logs both a message and a thrown exception. More...
 
static void SetLevel (LogLevel level)
 Sets the current log level. More...
 
static void Warning (String^ format,... array< Object^>^ args)
 Warning level logging with variable number of arguments using format as in System.String.Format. More...
 
static void Write (LogLevel level, String^ msg)
 Logs a message at the given level. More...
 

Detailed Description

Defines methods available to clients that want to write a log message to their Geode system's shared log file.

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.

Member Function Documentation

◆ Close()

static void Apache::Geode::Client::Log::Close ( )
static

Closes logging facility (until next init).

◆ Config()

static void Apache::Geode::Client::Log::Config ( String^  format,
... array< Object^>^  args 
)
inlinestatic

Config level logging with variable number of arguments using format as in System.String.Format.

◆ Debug()

static void Apache::Geode::Client::Log::Debug ( String^  format,
... array< Object^>^  args 
)
inlinestatic

Debug level logging with variable number of arguments using format as in System.String.Format.

◆ Enabled()

static bool Apache::Geode::Client::Log::Enabled ( LogLevel  level)
static

True if log messages at the given level are enabled.

◆ Error()

static void Apache::Geode::Client::Log::Error ( String^  format,
... array< Object^>^  args 
)
inlinestatic

Error level logging with variable number of arguments using format as in System.String.Format.

◆ Fine()

static void Apache::Geode::Client::Log::Fine ( String^  format,
... array< Object^>^  args 
)
inlinestatic

Fine level logging with variable number of arguments using format as in System.String.Format.

◆ Finer()

static void Apache::Geode::Client::Log::Finer ( String^  format,
... array< Object^>^  args 
)
inlinestatic

Finer level logging with variable number of arguments using format as in System.String.Format.

◆ Finest()

static void Apache::Geode::Client::Log::Finest ( String^  format,
... array< Object^>^  args 
)
inlinestatic

Finest level logging with variable number of arguments using format as in System.String.Format.

◆ Info()

static void Apache::Geode::Client::Log::Info ( String^  format,
... array< Object^>^  args 
)
inlinestatic

Info level logging with variable number of arguments using format as in System.String.Format.

◆ Init() [1/2]

static void Apache::Geode::Client::Log::Init ( LogLevel  level,
String^  logFileName 
)
static

Initializes the logging facility with the given level and filename.

Parameters
levelthe logging level
logFileNamethe log file name

◆ Init() [2/2]

static void Apache::Geode::Client::Log::Init ( LogLevel  level,
String^  logFileName,
System::Int32  logFileLimit 
)
static

Initializes logging facility with given level, filename, and file size limit.

Parameters
levelthe logging level
logFileNamethe log file name
logFileLimitmaximum allowable size of the log file, in bytes, or 0 for the default (1 Gbyte)

◆ Level()

static LogLevel Apache::Geode::Client::Log::Level ( )
static

Returns the current log level.

◆ LogCatch()

static void Apache::Geode::Client::Log::LogCatch ( LogLevel  level,
String^  msg,
System::Exception^  ex 
)
static

Logs both a message and a caught exception.

◆ LogThrow()

static void Apache::Geode::Client::Log::LogThrow ( LogLevel  level,
String^  msg,
System::Exception^  ex 
)
static

Logs both a message and a thrown exception.

◆ SetLevel()

static void Apache::Geode::Client::Log::SetLevel ( LogLevel  level)
static

Sets the current log level.

◆ Warning()

static void Apache::Geode::Client::Log::Warning ( String^  format,
... array< Object^>^  args 
)
inlinestatic

Warning level logging with variable number of arguments using format as in System.String.Format.

◆ Write()

static void Apache::Geode::Client::Log::Write ( LogLevel  level,
String^  msg 
)
static

Logs a message at the given level.


Apache Geode C++ Cache .NET API Documentation