ArLog Class Reference

#include <ArLog.h>

List of all members.


Detailed Description

Logging utility class.

ArLog is a utility class to log all messages from Aria to a choosen destintation. Messages can be logged to stdout, stderr, a file, and turned off completely. Logging by default is set to stdout. The level of logging can be changed as well. Allowed levels are Terse, Normal, and Verbose. By default the level is set to Normal.


Public Types

enum  LogLevel { Terse, Normal, Verbose }
enum  LogType {
  StdOut, StdErr, File, Colbert,
  None
}

Static Public Member Functions

static void addToConfig (ArConfig *config)
 Use an ArConfig object to control ArLog's options.
static void aramInit (const char *prefix, ArLog::LogLevel defaultLevel=ArLog::Normal, double defaultSize=10)
 Init for aram behavior.
static void close ()
 Close the logging utility.
static bool init (LogType type, LogLevel level, const char *fileName="", bool logTime=false, bool alsoPrint=false, bool printThisCall=true)
 Initialize the logging utility with options.
static void log (LogLevel level, const char *str,...)
 Log a message, with formatting and variable number of arguments.
static void logNoLock (LogLevel level, const char *str,...)
static void logPlain (LogLevel level, const char *str)
 Log a message containing just a plain string.

Static Public Attributes

static void(* colbertPrint )(int i, const char *str)

Static Protected Member Functions

static bool aramProcessFile (void)
static void filledAramLog (void)
static bool processFile (void)

Static Protected Attributes

static bool ourAlsoPrint
static char ourAramConfigLogLevel [1024]
static double ourAramConfigLogSize
static ArGlobalRetFunctor<
bool > 
ourAramConfigProcessFileCB
static double ourAramLogSize
static std::string ourAramPrefix
static int ourCharsLogged
static int ourColbertStream
static bool ourConfigAlsoPrint
static char ourConfigFileName [1024]
static LogLevel ourConfigLogLevel
static bool ourConfigLogTime
static LogType ourConfigLogType
static ArGlobalRetFunctor<
bool > 
ourConfigProcessFileCB
static std::string ourFileName
static FILE * ourFP
static LogLevel ourLevel
static ArLogourLog
static bool ourLoggingTime
static ArMutex ourMutex
static LogType ourType
static bool ourUseAramBehavior


Member Enumeration Documentation

enum ArLog::LogLevel

Enumerator:
Terse  Use terse logging.
Normal  Use normal logging.
Verbose  Use verbose logging.

enum ArLog::LogType

Enumerator:
StdOut  Use stdout for logging.
StdErr  Use stderr for logging.
File  Use a file for logging.
Colbert  Use a Colbert stream for logging.
None  Disable logging.


Member Function Documentation

static void ArLog::log ( LogLevel  level,
const char *  str,
  ... 
) [static]

Log a message, with formatting and variable number of arguments.

Java and Python Wrappers: In Java and Python, this function only takes one string argument. Use Java or Python's native facities for constructing a formatted string, e.g. the % and + string operators in Python, and the methods of the Java String class.


The documentation for this class was generated from the following file:
Generated on Thu Aug 6 09:39:35 2009 for Aria by  doxygen 1.5.1