WD
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
webdriver::PerfLog Class Reference

#include <webdriver_logging.h>

Inheritance diagram for webdriver::PerfLog:
Collaboration diagram for webdriver::PerfLog:

Public Member Functions

 PerfLog ()
 
virtual ~PerfLog ()
 
virtual void Log (LogLevel level, const base::Time &time, const std::string &message) OVERRIDE
 
void set_min_log_level (LogLevel level)
 
LogLevel min_log_level ()
 
- Public Member Functions inherited from webdriver::InMemoryLog
 InMemoryLog ()
 
virtual ~InMemoryLog ()
 
const base::ListValue * entries_list () const
 
void clear_entries_list ()
 
- Public Member Functions inherited from webdriver::LogHandler
 LogHandler ()
 
virtual ~LogHandler ()
 

Detailed Description

Performance log handler.
Limitation: currently we can collect Performance Logs only for QWebViewExt.
If you need receive perf logs for other QWebViews or their subclasses, you should change the network access manager before the QWebPage has used it (in other cases the results of doing this are undefined) :

QWebView* view = new QWebView;;
QNetworkAccessManager* manager = new QNetworkAccessManagerTracer(session, view->page());
view->page()->setNetworkAccessManager(manager);

before the first call to the page. After that you can connect to the window.

In other case you can change manager in constructor custom webviews like QWebViewExt. Then you can register and use it as usually :

webCreator->RegisterViewClass<CustomWebView>("CustomWebView");

If your CustomWebView class is overriding createWindow method of QWebView, you should ensure that new windows will use needed network access manager with logs support.

Constructor & Destructor Documentation

webdriver::PerfLog::PerfLog ( )
virtual webdriver::PerfLog::~PerfLog ( )
virtual

Member Function Documentation

virtual void webdriver::PerfLog::Log ( LogLevel  level,
const base::Time &  time,
const std::string &  message 
)
virtual

add single log item

Parameters
levellog level
timetimestamp
messagelog message

Reimplemented from webdriver::InMemoryLog.

LogLevel webdriver::PerfLog::min_log_level ( )
void webdriver::PerfLog::set_min_log_level ( LogLevel  level)

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