50 if (strncmp(path,
"stdio:", 6) == 0) {
53 }
else if (strncmp(path,
"daemon:", 7) == 0) {
56 }
else if (strncmp(path,
"tcp:", 4) == 0) {
59 }
else if (strncmp(path,
"udp:", 4) == 0) {
63 }
else if (strncmp(path,
"syslog:", 7) == 0) {
68 debugs(50,
DBG_IMPORTANT,
"WARNING: log name now starts with a module name. Use 'stdio:" << patharg <<
"'");
74 fatalf(
"logfileOpen: %s: couldn't open!\n", path);
int logfile_mod_daemon_open(Logfile *lf, const char *path, size_t, int)
int logfile_mod_stdio_open(Logfile *lf, const char *path, size_t bufsz, int fatal_flag)
int logfile_mod_syslog_open(Logfile *lf, const char *path, size_t bufsz, int fatal_flag)
int logfile_mod_udp_open(Logfile *lf, const char *path, size_t bufsz, int fatal_flag)
#define CBDATA_CLASS_INIT(type)
static int Open(Logfile *lf, const char *path, size_t bufSz, int fatalFlag)
int64_t sequence_number
Unique sequence number per log line.
LOGLINESTART * f_linestart
Logfile(const char *aPath)
struct Logfile::@63 flags
SBuf & vappendf(const char *fmt, va_list vargs)
size_type length() const
Returns the number of bytes stored in SBuf.
#define debugs(SECTION, LEVEL, CONTENT)
void fatalf(const char *fmt,...)
void logfileLineEnd(Logfile *lf)
void logfileWrite(Logfile *lf, const char *buf, size_t len)
void logfileFlush(Logfile *lf)
void logfileRotate(Logfile *lf, int16_t rotateCount)
void logfileLineStart(Logfile *lf)
void logfileClose(Logfile *lf)
void logfilePrintf(Logfile *lf, const char *fmt,...)
Logfile * logfileOpen(const char *path, size_t bufsz, int fatal_flag)
char * xstrncpy(char *dst, const char *src, size_t n)