#include <sys/types.h>
#include <string.h>
#include <stdio.h>
#include <string>
#include <stack>
#include "assa/Logger_Impl.h"
#include "assa/Singleton.h"
#include "assa/MemDump.h"
Go to the source code of this file.
Namespaces | |
namespace | ASSA |
namespace | ASSA::Log |
Defines | |
#define | LOGGER ASSA::Logger::get_instance() |
A shortcut to locate a singleton object of class Logger. | |
#define | DL(X) |
A macro for writing debug message to the Logger. | |
#define | EL(X) |
A macro for writing error message to the Logger. | |
#define | trace(s) ASSA::DiagnosticContext tRaCeR(s); |
trace() is used to trace function call chain in C++ program. | |
#define | trace_with_mask(s, m) ASSA::DiagnosticContext tRaCeR(s, m); |
trace_with_mask() is used to trace function call chain in C++ program. | |
Functions | |
void | set_app_name (const std::string &appname_) |
Set application name. | |
int | open_log_file (const char *logfname_, u_long groups_=ALL, u_long maxsize_=10485760) |
Open log file. | |
int | open_log_stdout (u_long groups_=ALL) |
Write log message to standard output. | |
int | open_log_server (const std::string &logsvraddr_, const char *logfname_, Reactor *reactor_, u_long groups_=ASSA::ALL, u_long maxsize_=10485760) |
Open connection with and write log message to the log server. | |
void | log_resync (void) |
Resynchronize logging stream after Fork. | |
int | log_close (void) |
Close logging stream. | |
void | set_gmt_timezone (void) |
Set timezone to GMT. | |
void | enable_timestamp (void) |
Enable timestamp logging. | |
void | disable_timestamp (void) |
Disable timestamp logging. |
Definition in file Logger.h.
|
|
|
A shortcut to locate a singleton object of class Logger.
Definition at line 136 of file Logger.h. Referenced by ASSA::DiagnosticContext::DiagnosticContext(), ASSA::Log::disable_timestamp(), ASSA::MemDump::dump_to_log(), ASSA::Log::enable_timestamp(), ASSA::Log::log_close(), ASSA::Log::log_resync(), ASSA::Log::open_log_file(), ASSA::Log::open_log_server(), ASSA::Log::open_log_stdout(), ASSA::Log::set_app_name(), ASSA::Log::set_gmt_timezone(), and ASSA::DiagnosticContext::~DiagnosticContext(). |
|
|
|
Disable timestamp logging.
Definition at line 368 of file Logger.h. References LOGGER. 00368 { LOGGER->disable_timestamp (); }
|
|
Enable timestamp logging.
Definition at line 365 of file Logger.h. References LOGGER. 00365 { LOGGER->enable_timestamp (); }
|
|
Close logging stream.
Definition at line 359 of file Logger.h. References LOGGER. Referenced by ASSA::GenServer::~GenServer(). 00359 { return LOGGER->log_close (); }
|
|
Resynchronize logging stream after Fork.
Definition at line 356 of file Logger.h. References LOGGER. 00356 { LOGGER->log_resync (); }
|
|
Open log file.
Definition at line 319 of file Logger.h. References LOGGER. Referenced by ASSA::GenServer::init_internals(). 00322 { 00323 return LOGGER->log_open (logfname_, groups_, maxsize_); 00324 }
|
|
Open connection with and write log message to the log server.
Definition at line 344 of file Logger.h. References LOGGER. Referenced by ASSA::GenServer::init_internals(). 00349 { 00350 int ret = LOGGER->log_open (logsvraddr_, logfname_, groups_, 00351 maxsize_, reactor_); 00352 return ret; 00353 }
|
|
Write log message to standard output.
Definition at line 327 of file Logger.h. References LOGGER. Referenced by ASSA::GenServer::init_internals(). 00328 { 00329 return LOGGER->log_open (groups_); 00330 }
|
|
Set application name. Call this function before any other to have application name set properly. This is especially important if you plan to call open_log_server() to send messages to the log server, assa-logd. Definition at line 305 of file Logger.h. References LOGGER. Referenced by ASSA::GenServer::init_internals(). 00306 { 00307 LOGGER->set_app_name (appname_); 00308 }
|
|
Set timezone to GMT.
Definition at line 362 of file Logger.h. References LOGGER. 00362 { LOGGER->set_timezone (0); }
|