34 int fd_debug = open(path.c_str(), O_WRONLY | O_APPEND | O_CREAT, 0600);
36 syslog(LOG_USER | LOG_ERR,
"could not open debug log %s (%d), abort",
64 switch (local_facility) {
102 unsigned len = prefix.length() + 1;
113 va_list variadic_list;
114 va_start(variadic_list, format);
115 int retval = vasprintf(&msg, format, variadic_list);
117 va_end(variadic_list);
123 localtime_r(&rawtime, &now);
124 fprintf(
file_debug,
"%s [%02d-%02d-%04d %02d:%02d:%02d %s]\n", msg,
125 (now.tm_mon)+1, now.tm_mday, (now.tm_year)+1900, now.tm_hour,
126 now.tm_min, now.tm_sec, now.tm_zone);
const unsigned kLogAuthzDebug
assert((mem||(size==0))&&"Out Of Memory")
void SetLogAuthzSyslogPrefix(const string &prefix)
const unsigned kLogAuthzSyslog
const unsigned kLogAuthzSyslogErr
void SetLogAuthzSyslogFacility(const int local_facility)
void SetLogAuthzDebug(const string &path)
const unsigned kLogAuthzSyslogWarn
const int const char * format
void LogAuthz(const int flags, const char *format,...)
void SetLogAuthzSyslogLevel(const int level)