Security::KeyLog Class Reference

a single tls_key_log directive configuration and logging handler More...

#include <KeyLog.h>

Inheritance diagram for Security::KeyLog:
Collaboration diagram for Security::KeyLog:

Public Member Functions

 KeyLog (ConfigParser &)
 
bool canLog () const
 whether record() preconditions are currently satisfied More...
 
void record (const CommunicationSecrets &)
 writes a single (but multi-line) key log entry More...
 
void dump (std::ostream &) const
 reproduces explicitly-configured squid.conf settings More...
 
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

Logfilelogfile = nullptr
 records writer More...
 
char * filename = nullptr
 logging destination More...
 
ACLListaclList = nullptr
 restrict logging to matching transactions More...
 
Format::FormatlogFormat = 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...
 
Optional< unsigned introtationsToKeep
 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

Definition at line 20 of file KeyLog.h.

Constructor & Destructor Documentation

◆ KeyLog()

Member Function Documentation

◆ canLog()

bool Security::KeyLog::canLog ( ) const
inline

Definition at line 26 of file KeyLog.h.

References FormattedLog::logfile.

Referenced by Security::KeyLogger::shouldLog().

◆ close()

void FormattedLog::close ( )
inherited

Definition at line 166 of file FormattedLog.cc.

References FormattedLog::logfile, and logfileClose().

Referenced by FormattedLog::~FormattedLog(), and Security::CloseLogs().

◆ dump()

void Security::KeyLog::dump ( std::ostream &  os) const

Definition at line 59 of file KeyLog.cc.

References Acl::AllowOrDeny().

Referenced by Configuration::Component< T >::Print().

◆ dumpOptions()

◆ open()

void FormattedLog::open ( )
inherited

◆ parseOptions()

void FormattedLog::parseOptions ( ConfigParser parser,
const char *  defaultFormat 
)
inherited

handles the [key=value...] part of the log configuration

Parameters
defaultFormatdefault 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 KeyLog().

◆ record()

◆ rotate()

◆ setLogformat()

◆ usesDaemon()

bool FormattedLog::usesDaemon ( ) const
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

ACLList* FormattedLog::aclList = nullptr
inherited

◆ bufferSize

size_t FormattedLog::bufferSize = 8*MAX_URL
inherited

◆ fatal

bool FormattedLog::fatal = true
inherited

◆ filename

char* FormattedLog::filename = nullptr
inherited

◆ logfile

Logfile* FormattedLog::logfile = nullptr
inherited

◆ logFormat

Format::Format* FormattedLog::logFormat = nullptr
inherited

Definition at line 64 of file FormattedLog.h.

Referenced by KeyLog(), FormattedLog::dumpOptions(), and FormattedLog::setLogformat().

◆ rotationsToKeep

Optional<unsigned int> FormattedLog::rotationsToKeep
inherited

◆ type

Log::Format::log_type FormattedLog::type = Log::Format::CLF_UNKNOWN
inherited

Definition at line 67 of file FormattedLog.h.

Referenced by KeyLog(), FormattedLog::dumpOptions(), and FormattedLog::setLogformat().


The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors