FormattedLog.cc
Go to the documentation of this file.
73 throw TextException(ToSBuf("unsupported ", cfg_directive, " option: ", key, "=", value), Here());
146 throw TextException(ToSBuf("unknown logformat name in ", cfg_directive, ": ", logformatName), Here());
const char * cfg_directive
During parsing, the name of the current squid.conf directive being parsed.
Definition: cache_cf.cc:271
void parseBytesOptionValue(size_t *bptr, const char *units, char const *value)
Parse bytes number from a string.
Definition: cache_cf.cc:1391
Definition: ConfigParser.h:46
bool optionalKvPair(char *&key, char *&value)
Definition: ConfigParser.cc:422
void dumpOptions(std::ostream &os) const
reports explicitly-configured key=value options, in squid.conf format
Definition: FormattedLog.cc:83
void setLogformat(const char *logformatName)
configures formatting-related settings for the given logformat name
Definition: FormattedLog.cc:127
bool fatal
whether unrecoverable errors (e.g., dropping a log record) kill worker
Definition: FormattedLog.h:76
Format::Format * logFormat
custom log record template for type == Log::Format::CLF_CUSTOM
Definition: FormattedLog.h:64
size_t bufferSize
how much to buffer before dropping or dying (buffer-size=N)
Definition: FormattedLog.h:70
std::optional< unsigned int > rotationsToKeep
how many log files to retain when rotating. Default: obey logfile_rotate
Definition: FormattedLog.h:73
void parseOptions(ConfigParser &, const char *defaultFormat)
Definition: FormattedLog.cc:36
static const char * BuiltInFormatName(Format::log_type type)
Definition: Config.cc:18
static Format::log_type FindBuiltInFormat(const char *logformatName)
Definition: Config.cc:52
struct SquidConfig::@98 Log
Logfile * logfileOpen(const char *path, size_t bufsz, int fatal_flag)
Definition: File.cc:40
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63