Squid Web Cache master
Loading...
Searching...
No Matches
CustomLog Class Reference

#include <CustomLog.h>

Inheritance diagram for CustomLog:
[legend]
Collaboration diagram for CustomLog:
[legend]

Public Member Functions

bool usesDaemon () const
 
void parseOptions (ConfigParser &, const char *defaultFormat)
 
void dumpOptions (std::ostream &os) const
 reports explicitly-configured key=value options, in squid.conf format
 
void setLogformat (const char *logformatName)
 configures formatting-related settings for the given logformat name
 
void open ()
 prepare for recording entries
 
void rotate ()
 handle the log rotation request
 
void close ()
 stop recording entries
 

Public Attributes

CustomLognext = nullptr
 next _log line (if any); maintained by cache_cf.cc
 
Logfilelogfile = nullptr
 records writer
 
char * filename = nullptr
 logging destination
 
ACLListaclList = nullptr
 restrict logging to matching transactions
 
Format::FormatlogFormat = nullptr
 custom log record template for type == Log::Format::CLF_CUSTOM
 
Log::Format::log_type type = Log::Format::CLF_UNKNOWN
 log record template ID
 
size_t bufferSize = 8*MAX_URL
 how much to buffer before dropping or dying (buffer-size=N)
 
std::optional< unsigned introtationsToKeep
 how many log files to retain when rotating. Default: obey logfile_rotate
 
bool fatal = true
 whether unrecoverable errors (e.g., dropping a log record) kill worker
 

Detailed Description

all same-directive transaction logging rules (e.g., all access_log rules or all icap_log rules)

Definition at line 17 of file CustomLog.h.

Member Function Documentation

◆ close()

void FormattedLog::close ( )
inherited

Definition at line 166 of file FormattedLog.cc.

References FormattedLog::logfile, and logfileClose().

Referenced by FormattedLog::~FormattedLog(), and Security::CloseLogs().

◆ dumpOptions()

◆ open()

void FormattedLog::open ( )
inherited

◆ parseOptions()

void FormattedLog::parseOptions ( ConfigParser parser,
const char *  defaultFormat 
)
inherited

handles the [key=value...] part of the log configuration

Parameters
defaultFormatdefault logformat or, to force built-in format, nil

Definition at line 36 of file FormattedLog.cc.

References assert, FormattedLog::bufferSize, cfg_directive, Debug::Extra(), FormattedLog::fatal, Here, ConfigParser::optionalKvPair(), parseBytesOptionValue(), FormattedLog::rotationsToKeep, FormattedLog::setLogformat(), ToSBuf(), and xatoui().

Referenced by Security::KeyLog::KeyLog().

◆ rotate()

void FormattedLog::rotate ( )
inherited

◆ setLogformat()

◆ usesDaemon()

bool FormattedLog::usesDaemon ( ) const
inherited
Returns
whether the daemon module is used for this log

Definition at line 30 of file FormattedLog.cc.

References FormattedLog::filename.

Member Data Documentation

◆ aclList

ACLList* FormattedLog::aclList = nullptr
inherited

◆ bufferSize

size_t FormattedLog::bufferSize = 8*MAX_URL
inherited

◆ fatal

bool FormattedLog::fatal = true
inherited

◆ filename

char* FormattedLog::filename = nullptr
inherited

◆ logfile

Logfile* FormattedLog::logfile = nullptr
inherited

◆ logFormat

Format::Format* FormattedLog::logFormat = nullptr
inherited

◆ next

CustomLog* CustomLog::next = nullptr

Definition at line 21 of file CustomLog.h.

Referenced by dump_access_log(), free_access_log(), and parse_access_log().

◆ rotationsToKeep

std::optional<unsigned int> FormattedLog::rotationsToKeep
inherited

◆ type


The documentation for this class was generated from the following file: