
Definition in file log.C.
#include "Util/log.H"
#include "rutz/compat_snprintf.h"
#include "rutz/demangle.h"
#include "rutz/error_context.h"
#include <cerrno>
#include <cstdarg>
#include <cstdlib>
#include <cstdio>
#include <stdexcept>
#include <sys/types.h>
#include <unistd.h>
#include <cstring>
Include dependency graph for log.C:

Go to the source code of this file.
Defines | |
| #define | LBS 1024 |
| total max size of a log entry | |
Functions | |
| void | sendlog_aux (const char *raw_msg, const int level, const int flags) |
| A little helper function for sendlog(). | |
| int | snprintf (char *str, size_t n, const char *format,...) |
| int | vsnprintf (char *str, size_t n, const char *format, va_list ap) |
| void | sendlog (const char *msg,...) |
| Send a log. NON-GNUC, thread-unsafe version. | |
| void | report_current_exception (const int line, const char *file) throw () |
| Helper function for REPORT_CURRENT_EXCEPTION macro. | |
Variables | |
| int | LOG_FLAGS |
| Bitwise-or'ed combination of above flags. | |
| int | MYLOGVERB = LOG_INFO |
| const char * | MYLOGPREFIX = 0 |
| Null by default, but if set to non-null this string will be prefixed to every log message. | |
| char | MYLOGFUN [LBS2] |
| char | MYLOGFIL [LBS2] |
| int | MYLOGLIN |
| int | MYLOGLEV |
| int | MYLOGIDVAL |
| bool | MYLOG_USEP |
| bool | MYLOG_USEID |
|
|
total max size of a log entry
Definition at line 54 of file log.C. Referenced by sendlog(). |
|
||||||||||||
|
Helper function for REPORT_CURRENT_EXCEPTION macro.
Definition at line 315 of file log.C. References rutz::demangled_name(), and e. |
|
||||||||||||
|
Send a log. NON-GNUC, thread-unsafe version.
Definition at line 256 of file log.C. References i, LBS, LBS2, LOG_FLAGS, MYLOG_USEID, MYLOG_USEP, MYLOGFIL, MYLOGFUN, MYLOGIDVAL, MYLOGLEV, MYLOGLIN, MYLOGVERB, sendlog_aux(), snprintf(), and vsnprintf(). |
|
||||||||||||||||
|
A little helper function for sendlog(). This avoids duplicating the flag-parsing logic between our two versions of sendlog(). Definition at line 93 of file log.C. References rutz::error_context::current(), LFATAL_PRINTS_ABORT, LFATAL_THROWS, LFATAL_XTRA_NOISY, LOG_FULLTRACE, aux::msg(), MYLOGPREFIX, and rutz::error_context::prepend_to(). Referenced by sendlog(). |
|
|
Initial value: Bitwise-or'ed combination of above flags.
Definition at line 56 of file log.C. Referenced by main(), mexFunction(), and sendlog(). |
|
|
Null by default, but if set to non-null this string will be prefixed to every log message. This can be useful if you have multiple threads or multiple processes all writing to stdout, and you want to have some way to distinguish their log messages. Definition at line 66 of file log.C. Referenced by handlesignal(), run_master(), run_slave(), and sendlog_aux(). |
|
1.4.4