namespace Akenti class Logger

Logger

Public Methods

static std::string format (const std::string& base64String)
Formats a base64 string into 64 character lines seperated by newlines
static std::string deformat (const std::string& base64String)
Removes all formating (spaces, line returns etc
virtual ~Logger ()
Destroys this object
static bool hasBeenInitialized ()
Returns true if init has been called
static Logger* init (const string& id, string& message)
Returns a Logger given an identity string specified by id
static Logger* init (const string& id, const Properties& props, string& message)
static int write (int level, const string& key, const string& message)
Writes this log to the destination provided that level is less than or equal to the logging level specified in the config file
static int setLevel (int level)
Sets the logging level for this Logger to level
static void flush ()

Protected Methods

virtual int doWrite (int, const string&, const string&, const string&)
virtual int doSetLevel (int)
virtual void doFlush ()

Documentation

Logger.
static std::string format(const std::string& base64String)
Formats a base64 string into 64 character lines seperated by newlines

static std::string deformat(const std::string& base64String)
Removes all formating (spaces, line returns etc.) from a base64 string.

virtual ~Logger()
Destroys this object

static bool hasBeenInitialized()
Returns true if init has been called.
Returns:
true if already initialized.

static Logger* init(const string& id, string& message)
Returns a Logger given an identity string specified by id. This identity string will be included in all the subsequent logs and, if possible, it should indicate who is making the request for access i.e. the remote host that the request comes from and/or the distinguished name of the requestor. This Logger must be freed by the caller. We support 4 logging destinations server, file, stderr, stdout. The destination parameters are loaded from the system properties. The default is stderr. Note NULL is returned if we are unable to open logs destination.
Throws:
Error if logger has been initialized or bad memory allocation
Returns:
a logger that must be freed by the caller.
Parameters:
id - identity string that will be included in each log message
message - string out parameter that stores the outcome of init
See Also:
getSystemProperties()

static Logger* init(const string& id, const Properties& props, string& message)

static int write(int level, const string& key, const string& message)
Writes this log to the destination provided that level is less than or equal to the logging level specified in the config file. Note: No logs will be writen if a successful call to init(...) has not been made.
Parameters:
level - int logging level of this message
keyword - string application-specific event label
message - string message to be logged
See Also:
setLogLevel()

static int setLevel(int level)
Sets the logging level for this Logger to level. All write(...) calls include as their first argument a logging level. Only writes with a logging level less than level will be logged. This allows a program to change at runtime how much logging to perform
Returns:
the old logging level
Parameters:
level - int the new logging level for this logger
See Also:
write(int, const string&, const string&).

static void flush()

virtual int doWrite(int, const string&, const string&, const string&)

virtual int doSetLevel(int)

virtual void doFlush()


This class has no child classes.
Author:
Mary Thompson Gary Hoo Abdelilah Essiari
Version:
1.1 05/24/01

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de