Open-Transactions  0.93.0-ge03d287
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OTLog.cpp File Reference
#include "stdafx.hpp"
#include "OTLog.hpp"
#include "util/OTPaths.hpp"
#include "util/stacktrace.h"
#include "opentxs/core/Version.hpp"
#include <mutex>
#include <cerrno>
#include <fstream>
#include <iostream>
#include <libgen.h>
#include <unistd.h>
#include <signal.h>
#include <ucontext.h>
#include <wordexp.h>
#include <execinfo.h>
#include <sys/resource.h>
#include <sys/stat.h>
Include dependency graph for OTLog.cpp:

Go to the source code of this file.

Classes

struct  opentxs::sig_ucontext_t
 

Namespaces

 opentxs
 

Macros

#define LOG_DEQUE_SIZE   1024
 
#define _GNU_SOURCE
 
#define __USE_GNU
 
#define LOGFILE_PRE   "log-"
 
#define LOGFILE_EXT   ".log"
 
#define GLOBAL_LOGNAME   "init"
 
#define GLOBAL_LOGFILE   "init.log"
 
#define OT_HANDLE_SIGNAL(OT_SIGNAL_TYPE)
 

Functions

OTLOG_IMPORT OTLogStream opentxs::otErr (-1)
 
OTLOG_IMPORT OTLogStream opentxs::otInfo (2)
 
OTLOG_IMPORT OTLogStream opentxs::otOut (0)
 
OTLOG_IMPORT OTLogStream opentxs::otWarn (1)
 
OTLOG_IMPORT OTLogStream opentxs::otLog3 (3)
 
OTLOG_IMPORT OTLogStream opentxs::otLog4 (4)
 
OTLOG_IMPORT OTLogStream opentxs::otLog5 (5)
 
void opentxs::ot_terminate (void)
 
void opentxs::crit_err_hdlr (int32_t sig_num, siginfo_t *info, void *ucontext)
 

Macro Definition Documentation

#define __USE_GNU

Definition at line 186 of file OTLog.cpp.

#define _GNU_SOURCE

Definition at line 182 of file OTLog.cpp.

#define GLOBAL_LOGFILE   "init.log"

Definition at line 244 of file OTLog.cpp.

#define GLOBAL_LOGNAME   "init"

Definition at line 243 of file OTLog.cpp.

#define LOG_DEQUE_SIZE   1024

Definition at line 165 of file OTLog.cpp.

#define LOGFILE_EXT   ".log"

Definition at line 242 of file OTLog.cpp.

#define LOGFILE_PRE   "log-"

Definition at line 241 of file OTLog.cpp.

#define OT_HANDLE_SIGNAL (   OT_SIGNAL_TYPE)
Value:
{ \
struct sigaction new_action, old_action; \
new_action.sa_sigaction = crit_err_hdlr; \
sigemptyset(&new_action.sa_mask); \
new_action.sa_flags = SA_RESTART | SA_SIGINFO; \
\
sigaction(OT_SIGNAL_TYPE, nullptr, &old_action); \
\
if (old_action.sa_handler != SIG_IGN) { \
if (sigaction(OT_SIGNAL_TYPE, &new_action, nullptr) != 0) { \
otErr << "OTLog::SetupSignalHandler: Failed setting signal " \
"handler for error " << OT_SIGNAL_TYPE << " (" \
<< strsignal(OT_SIGNAL_TYPE) << ")\n"; \
abort(); \
} \
} \
}
OTLOG_IMPORT OTLogStream otErr
void crit_err_hdlr(int32_t sig_num, siginfo_t *info, void *ucontext)
Definition: OTLog.cpp:1141

Definition at line 1294 of file OTLog.cpp.