#include "squid.h"
#include "fatal.h"
#include "fd.h"
#include "fde.h"
#include "fs_io.h"
#include "globals.h"
#include "log/File.h"
#include "log/ModStdio.h"
#include "SquidConfig.h"
#include <cerrno>
Go to the source code of this file.
Classes | |
struct | l_stdio_t |
Functions | |
static void | logfileWriteWrapper (Logfile *lf, const void *buf, size_t len) |
static void | logfile_mod_stdio_writeline (Logfile *lf, const char *buf, size_t len) |
static void | logfile_mod_stdio_linestart (Logfile *) |
static void | logfile_mod_stdio_lineend (Logfile *lf) |
static void | logfile_mod_stdio_flush (Logfile *lf) |
static void | logfile_mod_stdio_rotate (Logfile *lf, const int16_t nRotate) |
static void | logfile_mod_stdio_close (Logfile *lf) |
int | logfile_mod_stdio_open (Logfile *lf, const char *path, size_t bufsz, int fatal_flag) |
Function Documentation
◆ logfile_mod_stdio_close()
|
static |
Definition at line 158 of file ModStdio.cc.
References l_stdio_t::buf, Logfile::data, Logfile::f_flush, l_stdio_t::fd, file_close(), and xfree.
Referenced by logfile_mod_stdio_open().
◆ logfile_mod_stdio_flush()
|
static |
Definition at line 92 of file ModStdio.cc.
References l_stdio_t::buf, Logfile::data, logfileWriteWrapper(), and l_stdio_t::offset.
Referenced by logfile_mod_stdio_open().
◆ logfile_mod_stdio_lineend()
|
static |
Definition at line 86 of file ModStdio.cc.
References Logfile::f_flush.
Referenced by logfile_mod_stdio_open().
◆ logfile_mod_stdio_linestart()
|
static |
Definition at line 81 of file ModStdio.cc.
Referenced by logfile_mod_stdio_open().
◆ logfile_mod_stdio_open()
Definition at line 177 of file ModStdio.cc.
References l_stdio_t::buf, l_stdio_t::bufsz, Config, Logfile::data, DBG_IMPORTANT, debugs, DISK_ERROR, SquidConfig::effectiveUser, Logfile::f_close, Logfile::f_flush, Logfile::f_lineend, Logfile::f_linestart, Logfile::f_linewrite, Logfile::f_rotate, fatalf(), l_stdio_t::fd, file_open(), logfile_mod_stdio_close(), logfile_mod_stdio_flush(), logfile_mod_stdio_lineend(), logfile_mod_stdio_linestart(), logfile_mod_stdio_rotate(), logfile_mod_stdio_writeline(), MYNAME, O_TEXT, Logfile::path, xcalloc(), xmalloc, and xstrerr().
Referenced by logfileOpen().
◆ logfile_mod_stdio_rotate()
|
static |
Definition at line 102 of file ModStdio.cc.
References SBuf::appendf(), assert, Logfile::data, DBG_CRITICAL, DBG_IMPORTANT, debugs, DISK_ERROR, Logfile::fatal, fatalf(), file_close(), file_open(), FileRename(), Logfile::flags, logfileFlush(), MYNAME, O_TEXT, Logfile::path, sb, and xstrerr().
Referenced by logfile_mod_stdio_open().
◆ logfile_mod_stdio_writeline()
Definition at line 53 of file ModStdio.cc.
References assert, l_stdio_t::buf, l_stdio_t::bufsz, Logfile::data, logfileFlush(), logfileWriteWrapper(), and l_stdio_t::offset.
Referenced by logfile_mod_stdio_open().
◆ logfileWriteWrapper()
Definition at line 35 of file ModStdio.cc.
References Logfile::data, Logfile::fatal, fatalf(), l_stdio_t::fd, fd_bytes(), FD_WRITE, FD_WRITE_METHOD(), Logfile::flags, Logfile::path, and xstrerr().
Referenced by logfile_mod_stdio_flush(), and logfile_mod_stdio_writeline().