26#define LOGFILE_MAXBUFS 128
32#define LOGFILE_BUFSZ 32768
35#define LOGFILE_WARN_TIME 30
65 debugs(50, 5,
"logfileNewBuffer: " << lf->
path <<
": new buffer");
109 debugs(50, 3, lf->
path <<
": write returned " << ret);
119 fatal(
"I don't handle this error well!");
125 fatal(
"I don't handle this error well!");
173 debugs(50, 3,
"logfile_mod_daemon_append: " << lf->
path <<
": appending " << len <<
" bytes");
177 debugs(50, 3,
"logfile_mod_daemon_append: current buffer has " << b->
len <<
" of " << b->
size <<
" bytes before append");
179 memcpy(b->
buf + b->
len, buf, s);
230 args[0] =
"(logfile-daemon)";
236 fatal(
"Couldn't start logfile helper");
264 kill(ll->
pid, SIGTERM);
296 debugs(50,
DBG_IMPORTANT,
"Logfile: " << lf->
path <<
": queue is too large; some log messages have been lost.");
340 debugs(50,
DBG_IMPORTANT,
"ERROR: Logfile Daemon: Could not set the pipe blocking for flush! You are now missing some log entries.");
347 fatalf(
"Logfile Daemon: %s: Couldn't set the pipe non-blocking for flush!\n", lf->
path);
static LOGLINESTART logfile_mod_daemon_linestart
static LOGFLUSH logfile_mod_daemon_flush
static LOGWRITE logfile_mod_daemon_writeline
static LOGROTATE logfile_mod_daemon_rotate
int logfile_mod_daemon_open(Logfile *lf, const char *path, size_t, int)
static void logfileQueueWrite(Logfile *lf)
#define LOGFILE_WARN_TIME
static void logfileNewBuffer(Logfile *lf)
static LOGCLOSE logfile_mod_daemon_close
static void logfileHandleWrite(int, void *data)
static LOGLINEEND logfile_mod_daemon_lineend
static void logfileFlushEvent(void *data)
static void logfile_mod_daemon_append(Logfile *lf, const char *buf, int len)
static void logfileFreeBuffer(Logfile *lf, logfile_buffer_t *b)
void cbdataInternalUnlock(const void *p)
void cbdataInternalLock(const void *p)
LOGLINESTART * f_linestart
struct SquidConfig::@82 Log
struct SquidConfig::@90 onoff
int commSetNonBlocking(int fd)
int ignoreErrno(int ierrno)
int commUnsetNonBlocking(int fd)
A const & min(A const &lhs, A const &rhs)
#define debugs(SECTION, LEVEL, CONTENT)
#define COMM_SELECT_WRITE
void dlinkDelete(dlink_node *m, dlink_list *list)
void dlinkAddTail(void *data, dlink_node *m, dlink_list *list)
void eventDelete(EVH *func, void *arg)
void eventAdd(const char *name, EVH *func, void *arg, double when, int weight, bool cbdata)
void fatal(const char *message)
void fatalf(const char *fmt,...)
int FD_WRITE_METHOD(int fd, const char *buf, int len)
pid_t ipcCreate(int type, const char *prog, const char *const args[], const char *name, Ip::Address &local_addr, int *rfd, int *wfd, void **hIpc)
void logfileFlush(Logfile *lf)
void LOGROTATE(Logfile *, const int16_t)
void LOGLINESTART(Logfile *)
void LOGLINEEND(Logfile *)
void LOGWRITE(Logfile *, const char *, size_t len)
void SetSelect(int, unsigned int, PF *, void *, time_t)
Mark an FD to be watched for its IO status.
void * xcalloc(size_t n, size_t sz)
const char * xstrerr(int error)