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);
377Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logSequenceNumber) const
559 auto encLength = base64_encode_update(&ctx, buf, rawLength, reinterpret_cast<const uint8_t*>(handshake.rawContent()));
710 sb = ah->allMeta.getByNameListMember(fmt->data.header.header, fmt->data.header.element, fmt->data.header.separator);
769 sb = al->icap.request->header.getByNameListMember(fmt->data.header.header, fmt->data.header.element, fmt->data.header.separator);
799 sb = al->icap.reply->header.getByNameListMember(fmt->data.header.header, fmt->data.header.element, fmt->data.header.separator);
845 sb = msg->header.getByNameListMember(fmt->data.header.header, fmt->data.header.element, fmt->data.header.separator);
869 sb = al->proxyProtocolHeader->getElem(fmt->data.headerId, fmt->data.header.element, fmt->data.header.separator);
877 sb = al->adapted_request->header.getByNameListMember(fmt->data.header.header, fmt->data.header.element, fmt->data.header.separator);
885 sb = msg->header.getByNameListMember(fmt->data.header.header, fmt->data.header.element, fmt->data.header.separator);
1302 for (const Security::CertErrors *sslError = srvBump->sslErrors(); sslError; sslError = sslError->next) {
1388 Adaptation::History::Pointer ah = al->request ? al->request->adaptHistory() : Adaptation::History::Pointer();
1407 Adaptation::History::Pointer ah = al->request ? al->request->adaptHistory() : Adaptation::History::Pointer();
1462 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)));
1467 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));
1532 const bool haveMaxWidth = fmt->widthMax >=0 && !doint && !dooff && !doMsec && !doSec && !doUint64;
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
AnyP::Port FindListeningPortNumber(const HttpRequest *callerRequest, const AccessLogEntry *ale)
Definition: HttpRequest.cc:873
const Ip::Address * FindListeningPortAddress(const HttpRequest *callerRequest, const AccessLogEntry *ale)
Definition: HttpRequest.cc:864
SBuf StringToSBuf(const String &s)
create a new SBuf from a String by copying contents
Definition: StringConvert.h:17
void error(char *format,...)
size_t base64_encode_update(struct base64_encode_ctx *ctx, char *dst, size_t length, const uint8_t *src)
Definition: base64.c:265
size_t base64_encode_final(struct base64_encode_ctx *ctx, char *dst)
Definition: base64.c:308
char * last_meta
image of the last ICAP response header or eCAP meta received
Definition: AccessLogEntry.h:187
MessageSizes clientRequestSz
counters for the original request received from client
Definition: AccessLogEntry.h:103
struct timeval trTime
Transaction response time. The timer starts when the ICAP transaction is created and stops when the r...
Definition: AccessLogEntry.h:244
struct timeval ioTime
Transaction I/O time. The timer starts when the first ICAP request byte is scheduled for sending and ...
Definition: AccessLogEntry.h:250
void getLogClientIp(char *buf, size_t bufsz) const
Definition: AccessLogEntry.cc:20
SBuf getLogMethod() const
Fetch the transaction method string (ICP opcode, HTCP opcode or HTTP method)
Definition: AccessLogEntry.cc:72
void packReplyHeaders(MemBuf &mb) const
dump all reply headers (for sending or risky logging)
Definition: AccessLogEntry.cc:222
class AccessLogEntry::CacheDetails cache
const char * getClientIdent() const
Fetch the client IDENT string, or nil if none is available.
Definition: AccessLogEntry.cc:100
class AccessLogEntry::IcapLogEntry icap
class AccessLogEntry::Headers headers
Comm::ConnectionPointer tcpClient
TCP/IP level details about the client connection.
Definition: AccessLogEntry.h:83
class AccessLogEntry::HttpDetails http
const char * getExtUser() const
Fetch the external ACL provided 'user=' string, or nil if none is available.
Definition: AccessLogEntry.cc:112
const char * getLogClientFqdn(char *buf, size_t bufSize) const
Definition: AccessLogEntry.cc:51
class AccessLogEntry::AdaptationDetails adapt
ProxyProtocol::HeaderPointer proxyProtocolHeader
see ConnStateData::proxyProtocolHeader_
Definition: AccessLogEntry.h:210
const char * lastAclName
string for external_acl_type ACL format code
Definition: AccessLogEntry.h:191
const SBuf * effectiveVirginUrl() const
Definition: AccessLogEntry.cc:189
class AccessLogEntry::SslDetails ssl
void sumLogString(const char *serviceId, SBuf &)
dump xaction times, merging retried and retry times together
Definition: History.cc:83
HttpHeader allMeta
All REQMOD and RESPMOD meta headers merged. Last field wins conflicts.
Definition: History.h:63
void allLogString(const char *serviceId, SBuf &)
dump individual xaction times to a string
Definition: History.cc:67
virtual const char * credentialsStr()=0
Definition: CbDataList.h:16
const Security::NegotiationHistory * hasTlsNegotiations() const
Definition: Connection.h:138
Definition: client_side.h:84
void assemble(MemBuf &mb, const AccessLogEntryPointer &al, int logSequenceNumber) const
assemble the state information into a formatted line.
Definition: Format.cc:377
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: Token.h:36
bool totalResponseTime(struct timeval &responseTime)
Definition: access_log.cc:292
int64_t bodyBytesRead
number of body bytes received from the next hop or -1
Definition: HierarchyLogEntry.h:71
Comm::ConnectionPointer tcpServer
TCP/IP level details of the last peer/server connection.
Definition: HierarchyLogEntry.h:70
bool peerResponseTime(struct timeval &responseTime)
Definition: access_log.cc:265
Definition: HttpHeader.h:51
SBuf getByNameListMember(const char *name, const char *member, const char separator) const
Definition: HttpHeader.cc:918
HttpHeaderEntry * getEntry(HttpHeaderPos *pos) const
Definition: HttpHeader.cc:584
CbcPointer< ConnStateData > clientConnectionManager
Definition: HttpRequest.h:232
Adaptation::History::Pointer adaptHistory(bool createIfNone=false) const
Returns possibly nil history, creating it if requested.
Definition: HttpRequest.cc:404
MasterXaction::Pointer masterXaction
the master transaction this request belongs to. Never nil.
Definition: HttpRequest.h:238
Auth::UserRequest::Pointer auth_user_request
Definition: HttpRequest.h:127
const SBuf & effectiveRequestUri() const
RFC 7230 section 5.5 - Effective Request URI.
Definition: HttpRequest.cc:744
char * toStr(char *buf, const unsigned int blen, int force=AF_UNSPEC) const
Definition: Address.cc:792
Definition: MemBuf.h:24
bool find(SBuf &resultNote, const char *noteKey, const char *sep=",") const
Definition: Notes.cc:272
void appendf(const char *fmt,...) PRINTF_FORMAT_ARG2
Append operation with printf-style arguments.
Definition: Packable.h:61
const char * negotiatedVersion() const
String representation of TLS negotiated version.
Definition: NegotiationHistory.h:31
const char * cipherName() const
Definition: NegotiationHistory.cc:104
const char * helloVersion() const
String representation of the received TLS hello message version.
Definition: NegotiationHistory.h:33
const char * supportedVersion() const
Definition: NegotiationHistory.h:36
Definition: ServerBump.h:34
Definition: Store.h:42
void append(char const *, int) override
Appends a c-string to existing packed data.
Definition: store.cc:789
const char * sslGetUserAttribute(SSL *ssl, const char *attribute_name)
Definition: support.cc:858
const char * sslGetCAAttribute(SSL *ssl, const char *attribute_name)
Definition: support.cc:871
const char * hier_code_str[]
Definition: SchemeConfig.h:28
const SBuf Dash
@ LFT_TLS_SERVER_NEGOTIATED_VERSION
Definition: ByteCode.h:229
@ LFT_TOTAL_SERVER_SIDE_RESPONSE_TIME
Definition: ByteCode.h:167
@ LFT_TLS_SERVER_NEGOTIATED_CIPHER
Definition: ByteCode.h:231
@ LFT_HTTP_SENT_STATUS_CODE_OLD_30
Definition: ByteCode.h:122
@ LFT_TRANSPORT_CLIENT_CONNECTION_ID
Definition: ByteCode.h:49
@ LFT_PROXY_PROTOCOL_RECEIVED_ALL_HEADERS
Definition: ByteCode.h:257
@ LFT_TLS_SERVER_SUPPORTED_VERSION
Definition: ByteCode.h:235
@ LFT_TLS_CLIENT_NEGOTIATED_CIPHER
Definition: ByteCode.h:230
@ LFT_PROXY_PROTOCOL_RECEIVED_HEADER
Definition: ByteCode.h:255
@ LFT_TLS_CLIENT_NEGOTIATED_VERSION
Definition: ByteCode.h:228
@ LFT_TLS_CLIENT_RECEIVED_HELLO_VERSION
Definition: ByteCode.h:232
@ LFT_TLS_CLIENT_SUPPORTED_VERSION
Definition: ByteCode.h:234
@ LFT_PROXY_PROTOCOL_RECEIVED_HEADER_ELEM
Definition: ByteCode.h:256
@ LFT_TLS_SERVER_RECEIVED_HELLO_VERSION
Definition: ByteCode.h:233
size_t AssembleOne(const char *start, MemBuf &buf, const AccessLogEntryPointer &ale)
Definition: Format.cc:99
SBuf IssuerName(Certificate &)
The Issuer field of the given certificate (if found) or an empty SBuf.
Definition: Certificate.cc:28
SBuf SubjectName(Certificate &)
The SubjectName field of the given certificate (if found) or an empty SBuf.
Definition: Certificate.cc:68
const char * GetErrorName(const Security::ErrorCode code, const bool prefixRawCode=false)
Definition: ErrorDetail.h:38
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63
Definition: base64.h:69
struct timeval current_time
the current UNIX time in timeval {seconds, microseconds} format
Definition: gadgets.cc:17