#include <CustomLog.h>
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 More... | |
void | setLogformat (const char *logformatName) |
configures formatting-related settings for the given logformat name More... | |
void | open () |
prepare for recording entries More... | |
void | rotate () |
handle the log rotation request More... | |
void | close () |
stop recording entries More... | |
Public Attributes | |
CustomLog * | next = nullptr |
next _log line (if any); maintained by cache_cf.cc More... | |
Logfile * | logfile = nullptr |
records writer More... | |
char * | filename = nullptr |
logging destination More... | |
ACLList * | aclList = nullptr |
restrict logging to matching transactions More... | |
Format::Format * | logFormat = nullptr |
custom log record template for type == Log::Format::CLF_CUSTOM More... | |
Log::Format::log_type | type = Log::Format::CLF_UNKNOWN |
log record template ID More... | |
size_t | bufferSize = 8*MAX_URL |
how much to buffer before dropping or dying (buffer-size=N) More... | |
std::optional< unsigned int > | rotationsToKeep |
how many log files to retain when rotating. Default: obey logfile_rotate More... | |
bool | fatal = true |
whether unrecoverable errors (e.g., dropping a log record) kill worker More... | |
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()
|
inherited |
Definition at line 166 of file FormattedLog.cc.
References FormattedLog::logfile, and logfileClose().
Referenced by FormattedLog::~FormattedLog(), and Security::CloseLogs().
◆ dumpOptions()
|
inherited |
Definition at line 83 of file FormattedLog.cc.
References FormattedLog::bufferSize, Log::LogConfig::BuiltInFormatName(), Log::Format::CLF_CUSTOM, Log::Format::CLF_NONE, Log::Format::CLF_SQUID, Log::Format::CLF_UNKNOWN, FormattedLog::fatal, FormattedLog::logFormat, MAX_URL, Format::Format::name, FormattedLog::rotationsToKeep, and FormattedLog::type.
◆ open()
|
inherited |
Definition at line 150 of file FormattedLog.cc.
References FormattedLog::bufferSize, FormattedLog::fatal, FormattedLog::filename, FormattedLog::logfile, logfileOpen(), and Must.
Referenced by Security::OpenLogs().
◆ parseOptions()
|
inherited |
handles the [key=value...] part of the log configuration
- Parameters
-
defaultFormat default 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()
|
inherited |
Definition at line 159 of file FormattedLog.cc.
References Config, SquidConfig::Log, FormattedLog::logfile, logfileRotate(), SquidConfig::rotateNumber, and FormattedLog::rotationsToKeep.
Referenced by Security::RotateLogs().
◆ setLogformat()
|
inherited |
Definition at line 127 of file FormattedLog.cc.
References assert, cfg_directive, Log::Format::CLF_CUSTOM, Log::Format::CLF_UNKNOWN, debugs, FormattedLog::filename, Log::LogConfig::FindBuiltInFormat(), Here, FormattedLog::logFormat, Log::TheConfig, ToSBuf(), and FormattedLog::type.
Referenced by FormattedLog::parseOptions().
◆ usesDaemon()
|
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
|
inherited |
Definition at line 61 of file FormattedLog.h.
Referenced by Security::KeyLog::KeyLog(), FormattedLog::~FormattedLog(), and Security::KeyLogger::shouldLog().
◆ bufferSize
Definition at line 70 of file FormattedLog.h.
Referenced by FormattedLog::dumpOptions(), FormattedLog::open(), and FormattedLog::parseOptions().
◆ fatal
|
inherited |
Definition at line 76 of file FormattedLog.h.
Referenced by FormattedLog::dumpOptions(), FormattedLog::open(), and FormattedLog::parseOptions().
◆ filename
|
inherited |
Definition at line 58 of file FormattedLog.h.
Referenced by Security::KeyLog::KeyLog(), FormattedLog::~FormattedLog(), FormattedLog::open(), FormattedLog::setLogformat(), and FormattedLog::usesDaemon().
◆ logfile
|
inherited |
Definition at line 55 of file FormattedLog.h.
Referenced by Security::KeyLog::canLog(), FormattedLog::close(), FormattedLog::open(), and FormattedLog::rotate().
◆ logFormat
|
inherited |
Definition at line 64 of file FormattedLog.h.
Referenced by Security::KeyLog::KeyLog(), FormattedLog::dumpOptions(), and FormattedLog::setLogformat().
◆ next
CustomLog* CustomLog::next = nullptr |
Definition at line 21 of file CustomLog.h.
Referenced by parse_access_log().
◆ rotationsToKeep
|
inherited |
Definition at line 73 of file FormattedLog.h.
Referenced by FormattedLog::dumpOptions(), FormattedLog::parseOptions(), and FormattedLog::rotate().
◆ type
|
inherited |
Definition at line 67 of file FormattedLog.h.
Referenced by Security::KeyLog::KeyLog(), FormattedLog::dumpOptions(), and FormattedLog::setLogformat().
The documentation for this class was generated from the following file:
- src/log/CustomLog.h