Format.cc
Go to the documentation of this file.
152 snprintf(argbuf, sizeof(argbuf), "%s:%c%s", t->data.header.header, t->data.header.separator, t->data.header.element);
377 Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logSequenceNumber) const
565 auto encLength = base64_encode_update(&ctx, buf, rawLength, reinterpret_cast<const uint8_t*>(handshake.rawContent()));
639 // TODO: Avoid the need for updates by keeping totalPeeringTime (or even ALE::hier) in one place.
723 sb = ah->allMeta.getByNameListMember(fmt->data.header.header, fmt->data.header.element, fmt->data.header.separator);
782 sb = al->icap.request->header.getByNameListMember(fmt->data.header.header, fmt->data.header.element, fmt->data.header.separator);
812 sb = al->icap.reply->header.getByNameListMember(fmt->data.header.header, fmt->data.header.element, fmt->data.header.separator);
858 sb = msg->header.getByNameListMember(fmt->data.header.header, fmt->data.header.element, fmt->data.header.separator);
882 sb = al->proxyProtocolHeader->getElem(fmt->data.headerId, fmt->data.header.element, fmt->data.header.separator);
890 sb = al->adapted_request->header.getByNameListMember(fmt->data.header.header, fmt->data.header.element, fmt->data.header.separator);
898 sb = msg->header.getByNameListMember(fmt->data.header.header, fmt->data.header.element, fmt->data.header.separator);
1309 for (const Security::CertErrors *sslError = srvBump->sslErrors(); sslError; sslError = sslError->next) {
1395 Adaptation::History::Pointer ah = al->request ? al->request->adaptHistory() : Adaptation::History::Pointer();
1417 Adaptation::History::Pointer ah = al->request ? al->request->adaptHistory() : Adaptation::History::Pointer();
1474 sb.appendf("%0*" PRId64 ".%0*" PRId64 "", fmt->zero && (fmt->widthMin - precision - 1 >= 0) ? fmt->widthMin - precision - 1 : 0, static_cast<int64_t>(outtv.tv_sec * 1000 + outtv.tv_usec / 1000), precision, static_cast<int64_t>((outtv.tv_usec % 1000 )* (1000 / fmt->divisor)));
1479 sb.appendf("%0*" PRId64 ".%0*d", fmt->zero && (fmt->widthMin - precision - 1 >= 0) ? fmt->widthMin - precision - 1 : 0, static_cast<int64_t>(outtv.tv_sec), precision, (int)(outtv.tv_usec / fmt->divisor));
const char * sslGetCAAttribute(SSL *ssl, const char *attribute_name)
Definition: support.cc:962
@ LFT_TRANSPORT_CLIENT_CONNECTION_ID
Definition: ByteCode.h:51
@ LFT_TLS_CLIENT_NEGOTIATED_VERSION
Definition: ByteCode.h:229
AnyP::Port FindListeningPortNumber(const HttpRequest *callerRequest, const AccessLogEntry *ale)
Definition: HttpRequest.cc:872
const char * helloVersion() const
String representation of the received TLS hello message version.
Definition: NegotiationHistory.h:33
Definition: CbDataList.h:15
void appendf(const char *fmt,...) PRINTF_FORMAT_ARG2
Append operation with printf-style arguments.
Definition: Packable.h:61
HttpHeader allMeta
All REQMOD and RESPMOD meta headers merged. Last field wins conflicts.
Definition: History.h:63
@ LFT_TOTAL_SERVER_SIDE_RESPONSE_TIME
Definition: ByteCode.h:168
const char * getLogClientFqdn(char *buf, size_t bufSize) const
Definition: AccessLogEntry.cc:51
virtual const char * credentialsStr()=0
@ LFT_PROXY_PROTOCOL_RECEIVED_HEADER
Definition: ByteCode.h:256
@ LFT_TLS_CLIENT_SUPPORTED_VERSION
Definition: ByteCode.h:235
void append(char const *, int) override
Appends a c-string to existing packed data.
Definition: store.cc:803
size_t base64_encode_final(struct base64_encode_ctx *ctx, char *dst)
Definition: base64.c:308
const char * GetErrorName(const Security::ErrorCode code, const bool prefixRawCode=false)
Definition: ErrorDetail.h:38
void print(std::ostream &os, const char *nameValueSeparator, const char *entryTerminator) const
Definition: Notes.cc:295
void error(char *format,...)
const SBuf * effectiveVirginUrl() const
Definition: AccessLogEntry.cc:175
class AccessLogEntry::SslDetails ssl
void rawAppendFinish(const char *start, size_type actualSize)
Definition: SBuf.cc:144
Auth::UserRequest::Pointer auth_user_request
Definition: HttpRequest.h:127
const char * negotiatedVersion() const
String representation of TLS negotiated version.
Definition: NegotiationHistory.h:31
const char * cipherName() const
Definition: NegotiationHistory.cc:104
bool ran() const
whether we ever measured time (i.e. resume() has been called)
Definition: Stopwatch.h:43
Definition: base64.h:68
SBuf SubjectName(Certificate &)
The SubjectName field of the given certificate (if found) or an empty SBuf.
Definition: Certificate.cc:68
@ LFT_TLS_SERVER_NEGOTIATED_CIPHER
Definition: ByteCode.h:232
size_t AssembleOne(const char *start, MemBuf &buf, const AccessLogEntryPointer &ale)
Definition: Format.cc:99
char * toStr(char *buf, const unsigned int blen, int force=AF_UNSPEC) const
Definition: Address.cc:812
class AccessLogEntry::HttpDetails http
Definition: HttpHeader.h:50
class AccessLogEntry::IcapLogEntry icap
@ LFT_TLS_CLIENT_RECEIVED_HELLO_VERSION
Definition: ByteCode.h:233
Definition: Token.h:35
struct timeval current_time
the current UNIX time in timeval {seconds, microseconds} format
Definition: gadgets.cc:18
@ LFT_TLS_SERVER_NEGOTIATED_VERSION
Definition: ByteCode.h:230
char * last_meta
image of the last ICAP response header or eCAP meta received
Definition: AccessLogEntry.h:183
@ LFT_TLS_CLIENT_NEGOTIATED_CIPHER
Definition: ByteCode.h:231
@ LFT_HTTP_SENT_STATUS_CODE_OLD_30
Definition: ByteCode.h:124
const Security::NegotiationHistory * hasTlsNegotiations() const
Definition: Connection.h:138
Definition: client_side.h:79
Definition: MemBuf.h:23
SBuf StringToSBuf(const String &s)
create a new SBuf from a String by copying contents
Definition: StringConvert.h:17
@ LFT_TLS_SERVER_SUPPORTED_VERSION
Definition: ByteCode.h:236
Comm::ConnectionPointer tcpClient
TCP/IP level details about the client connection.
Definition: AccessLogEntry.h:80
bool peerResponseTime(struct timeval &responseTime)
Definition: access_log.cc:239
struct timeval ioTime
Transaction I/O time. The timer starts when the first ICAP request byte is scheduled for sending and ...
Definition: AccessLogEntry.h:246
bool find(SBuf &resultNote, const char *noteKey, const char *sep=",") const
Definition: Notes.cc:281
MasterXaction::Pointer masterXaction
the master transaction this request belongs to. Never nil.
Definition: HttpRequest.h:238
class AccessLogEntry::CacheDetails cache
SBuf IssuerName(Certificate &)
The Issuer field of the given certificate (if found) or an empty SBuf.
Definition: Certificate.cc:28
MessageSizes clientRequestSz
counters for the original request received from client
Definition: AccessLogEntry.h:100
class AccessLogEntry::Headers headers
void allLogString(const char *serviceId, SBuf &)
dump individual xaction times to a string
Definition: History.cc:67
const char * sslGetUserAttribute(SSL *ssl, const char *attribute_name)
Definition: support.cc:949
class AccessLogEntry::AdaptationDetails adapt
Definition: ServerBump.h:33
struct timeval trTime
Transaction response time. The timer starts when the ICAP transaction is created and stops when the r...
Definition: AccessLogEntry.h:240
Adaptation::History::Pointer adaptHistory(bool createIfNone=false) const
Returns possibly nil history, creating it if requested.
Definition: HttpRequest.cc:404
const Ip::Address * FindListeningPortAddress(const HttpRequest *callerRequest, const AccessLogEntry *ale)
Definition: HttpRequest.cc:863
@ LFT_TLS_SERVER_RECEIVED_HELLO_VERSION
Definition: ByteCode.h:234
Definition: Stream.h:20
@ LFT_PROXY_PROTOCOL_RECEIVED_ALL_HEADERS
Definition: ByteCode.h:258
void sumLogString(const char *serviceId, SBuf &)
dump xaction times, merging retried and retry times together
Definition: History.cc:83
int64_t bodyBytesRead
number of body bytes received from the next hop or -1
Definition: HierarchyLogEntry.h:60
Comm::ConnectionPointer tcpServer
TCP/IP level details of the last peer/server connection.
Definition: HierarchyLogEntry.h:59
ProxyProtocol::HeaderPointer proxyProtocolHeader
see ConnStateData::proxyProtocolHeader_
Definition: AccessLogEntry.h:206
const char * hier_code_str[]
Definition: Store.h:37
SBuf getByNameListMember(const char *name, const char *member, const char separator) const
Definition: HttpHeader.cc:917
void getLogClientIp(char *buf, size_t bufsz) const
Definition: AccessLogEntry.cc:20
@ LFT_PROXY_PROTOCOL_RECEIVED_HEADER_ELEM
Definition: ByteCode.h:257
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63
size_t base64_encode_update(struct base64_encode_ctx *ctx, char *dst, size_t length, const uint8_t *src)
Definition: base64.c:265
void packReplyHeaders(MemBuf &mb) const
dump all reply headers (for sending or risky logging)
Definition: AccessLogEntry.cc:208
void assemble(MemBuf &mb, const AccessLogEntryPointer &al, int logSequenceNumber) const
assemble the state information into a formatted line.
Definition: Format.cc:377
static const Http::Message * actualReplyHeader(const AccessLogEntry::Pointer &al)
Definition: Format.cc:350
static const Http::Message * actualRequestHeader(const AccessLogEntry::Pointer &al)
Definition: Format.cc:364
Stopwatch totalPeeringTime
cumulative time spent (so far) communicating with all peers (see %<tt)
Definition: HierarchyLogEntry.h:63
HttpHeaderEntry * getEntry(HttpHeaderPos *pos) const
Definition: HttpHeader.cc:583
const SBuf & effectiveRequestUri() const
RFC 7230 section 5.5 - Effective Request URI.
Definition: HttpRequest.cc:744
void dump(StoreEntry *entry, const char *directiveName, bool eol=true) const
dump this whole list of formats into the provided StoreEntry
Definition: Format.cc:117
Definition: SchemeConfig.h:27
const char * getExtUser() const
Fetch the external ACL provided 'user=' string, or nil if none is available.
Definition: AccessLogEntry.cc:100
const char * supportedVersion() const
Definition: NegotiationHistory.h:36
const SBuf Dash
SBuf getLogMethod() const
Fetch the transaction method string (ICP opcode, HTCP opcode or HTTP method)
Definition: AccessLogEntry.cc:72
CbcPointer< ConnStateData > clientConnectionManager
Definition: HttpRequest.h:232
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products