Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
net_instaweb::LogRecord Class Reference

Simple AbstractLogRecord implementation which owns a LoggingInfo protobuf. More...

#include "log_record.h"

Inheritance diagram for net_instaweb::LogRecord:
net_instaweb::AbstractLogRecord net_instaweb::CopyOnWriteLogRecord net_instaweb::MockLogRecord

Public Member Functions

 LogRecord (AbstractMutex *mutex)
 
LoggingInfo * logging_info ()
 
virtual void SetImageStats (int num_img_tags, int num_inlined_img_tags, int num_critical_images_used)
 Sets image related statistics.
 
virtual void SetResourceCounts (int num_external_css, int num_scripts)
 Sets the number of external resources on an HTML page.
 
virtual void AddFoundPropertyToCohortInfo (int page_type, const GoogleString &cohort, const GoogleString &property)
 
virtual void AddRetrievedPropertyToCohortInfo (int page_type, const GoogleString &cohort, const GoogleString &property)
 
void SetCacheStatusForCohortInfo (int page_type, const GoogleString &cohort, bool found, int key_state)
 Updates the cohort info to update the cache key state.
 
virtual void LogImageRewriteActivity (const char *id, const GoogleString &url, RewriterApplication::Status status, bool is_image_inlined, bool is_critical_image, bool is_url_rewritten, int size, bool try_low_res_src_insertion, bool low_res_src_inserted, ImageType low_res_image_type, int low_res_data_size)
 Log a RewriterInfo for the image rewrite filter.
 
void LogDeviceInfo (int device_type, bool supports_image_inlining, bool supports_lazyload_images, bool supports_critical_images_beacon, bool supports_deferjs, bool supports_webp_in_place, bool supports_webp_rewritten_urls, bool supports_webplossless_alpha, bool is_bot) override
 Log information related to the user agent and device making the request.
 
bool WriteLogImpl () override
 
- Public Member Functions inherited from net_instaweb::AbstractLogRecord
 AbstractLogRecord (AbstractMutex *mutex)
 
GoogleString AppliedRewritersString ()
 
RewriterInfo * NewRewriterInfo (const char *rewriter_id)
 
void SetRewriterLoggingStatus (const char *rewriter_id, RewriterApplication::Status status)
 
void SetRewriterLoggingStatus (const char *rewriter_id, const GoogleString &url, RewriterApplication::Status status)
 
void LogRewriterHtmlStatus (const char *rewriter_id, RewriterHtmlApplication::Status status)
 
void LogRewriterApplicationStatus (const char *rewriter_id, RewriterApplication::Status status)
 
void LogImageBackgroundRewriteActivity (RewriterApplication::Status status, const GoogleString &url, const char *id, int original_size, int optimized_size, bool is_recompressed, ImageType original_image_type, ImageType optimized_image_type, bool is_resized, int original_width, int original_height, bool is_resized_using_rendered_dimensions, int resized_width, int resized_height)
 
void SetIsHtml (bool is_html)
 Atomically sets is_html_response in the logging proto.
 
void SetIsOriginalResourceCacheable (bool cacheable)
 
void LogJsDisableFilter (const char *id, bool has_pagespeed_no_defer)
 
void LogLazyloadFilter (const char *id, RewriterApplication::Status status, bool is_blacklisted, bool is_critical)
 
bool WriteLog ()
 
AbstractMutexmutex ()
 
void SetRewriterInfoMaxSize (int x)
 
void SetAllowLoggingUrls (bool allow_logging_urls)
 
void SetLogUrlIndices (bool log_url_indices)
 
void SetNumHtmlCriticalImages (int num_html_critical_images)
 Sets the number of critical images in HTML.
 
void SetNumCssCriticalImages (int num_css_critical_images)
 Sets the number of critical images in CSS.
 
void SetCriticalCssInfo (int critical_inlined_bytes, int original_external_bytes, int overhead_bytes)
 Sets critical CSS related byte counts (all uncompressed).
 
void LogIsXhr (bool is_xhr)
 Log whether the request is an XmlHttpRequest.
 
virtual void SetBackgroundRewriteInfo (bool log_urls, bool log_url_indices, int max_rewrite_info_log_size)
 Sets initial information for background rewrite log.
 
virtual void SetTimingInfo (const RequestTimingInfo &timing_info)
 Set timing information in the logging implementation.
 

Additional Inherited Members

- Protected Member Functions inherited from net_instaweb::AbstractLogRecord
RewriterInfo * SetRewriterLoggingStatusHelper (const char *rewriter_id, const GoogleString &url, RewriterApplication::Status status)
 

Detailed Description

Simple AbstractLogRecord implementation which owns a LoggingInfo protobuf.

Member Function Documentation

virtual void net_instaweb::LogRecord::AddFoundPropertyToCohortInfo ( int  page_type,
const GoogleString cohort,
const GoogleString property 
)
inlinevirtual

Updated the cohort info to set the found to true for the given property.

Implements net_instaweb::AbstractLogRecord.

virtual void net_instaweb::LogRecord::AddRetrievedPropertyToCohortInfo ( int  page_type,
const GoogleString cohort,
const GoogleString property 
)
inlinevirtual

Updated the cohort info to set the retrieved to true for the given property.

Implements net_instaweb::AbstractLogRecord.

LoggingInfo* net_instaweb::LogRecord::logging_info ( )
inlinevirtual
Todo:
TODO(gee): Deprecate raw access to proto. Return the LoggingInfo proto wrapped by this class. Calling code must guard any reads and writes to this using mutex().

Implements net_instaweb::AbstractLogRecord.

bool net_instaweb::LogRecord::WriteLogImpl ( )
inlineoverridevirtual

Implements writing a log, base implementation is a no-op. Returns false if writing failed.

Implements net_instaweb::AbstractLogRecord.

Reimplemented in net_instaweb::CopyOnWriteLogRecord.


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