38 const char *explicitFormatName =
nullptr;
40 char *value =
nullptr;
43 if (strcmp(key,
"on-error") == 0) {
44 if (strcmp(value,
"die") == 0) {
46 }
else if (strcmp(value,
"drop") == 0) {
55 if (strcmp(key,
"buffer-size") == 0) {
60 if (strcmp(key,
"rotate") == 0) {
65 if (strcmp(key,
"logformat") == 0 && defaultFormatName) {
66 if (explicitFormatName)
69 explicitFormatName = value;
76 if (
const auto formatName = explicitFormatName ? explicitFormatName : defaultFormatName) {
117 os <<
" on-error=drop";
120 os <<
" buffer-size=" <<
bufferSize <<
"bytes";
133 debugs(3, 7,
"possible " <<
filename <<
" logformat: " << logformatName);
135 if (
const auto lf =
Log::TheConfig.findCustomFormat(logformatName)) {
#define Here()
source code location of the caller
unsigned int xatoui(const char *token, char eov)
const char * cfg_directive
During parsing, the name of the current squid.conf directive being parsed.
void parseBytesOptionValue(size_t *bptr, const char *units, char const *value)
Parse bytes number from a string.
bool optionalKvPair(char *&key, char *&value)
static std::ostream & Extra(std::ostream &)
static const char * BuiltInFormatName(Format::log_type type)
static Format::log_type FindBuiltInFormat(const char *logformatName)
struct SquidConfig::@82 Log
an std::runtime_error with thrower location info
#define debugs(SECTION, LEVEL, CONTENT)
void aclDestroyAclList(ACLList **list)
void logfileRotate(Logfile *lf, int16_t rotateCount)
void logfileClose(Logfile *lf)
Logfile * logfileOpen(const char *path, size_t bufsz, int fatal_flag)
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf