143 bool release =
false;
205 m_sink <<
"\nReached maximum allowable size\n"
207 <<
", m_maxsize = " <<
m_maxsize << std::endl;
216 std::ios::app | std::ios::out);
242 m_sink << std::setw(8) << std::hex <<
m_groups <<
'\n' << std::dec;
245 <<
"m_tmflg = " <<
m_tmflg <<
'\n'
247 <<
"m_state = opened\n"
A collection of assert function wrappers.
#define Assure_exit(exp_)
Macro that makes program exit if assert fails.
Implemention of a Logger as a disk-based file.
Class TimeVal is a wrapper around UNIX timeval structure.
A wrapper class to provide AutoPtr with reference semantics.
virtual int log_func(Group g_, size_t indent_level_, const string &func_name_, marker_t type_)
virtual int log_open(const char *logfname_, u_long groups_, u_long maxsize_=10485760)
Open File Logger.
virtual int log_close(void)
virtual int log_msg(Group g_, size_t indent_level_, const string &func_name_, size_t expected_sz_, const char *fmt_, va_list)
If output string is longer then LOGGER_MAXLINE-1, it is truncated to that size.
int log_raw_msg(const string &msg_)
Log message as it is (raw) without indentation or timestamping, but still perform byte counting and t...
char * format_msg(size_t expected_sz_, const char *fmt_, va_list vap_, bool &release_)
Format and put the message in the buffer.
virtual u_short indent_func_name(ostream &sink_, const string &funcname_, size_t indent_level_, marker_t type_)
bool group_enabled(Group g_) const
u_short m_indent_step
Indentation step.
u_long m_groups
Enabled groups.
string m_logfname
Log file name.
virtual u_short add_timestamp(ostream &sink_)
bool m_tmflg
Timestamp on/off flag.