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

#include <webdriver_logging.h>

Inheritance diagram for webdriver::FileLog:
Collaboration diagram for webdriver::FileLog:

Public Member Functions

 FileLog (const FilePath &path, LogLevel level)
 
virtual ~FileLog ()
 
virtual void Log (LogLevel level, const base::Time &time, const std::string &message) OVERRIDE
 
bool GetLogContents (std::string *contents) const
 
bool IsOpen () const
 
void set_min_log_level (LogLevel level)
 
const FilePath & path () const
 
- Public Member Functions inherited from webdriver::LogHandler
 LogHandler ()
 
virtual ~LogHandler ()
 

Static Public Member Functions

static void SetGlobalLog (FileLog *log)
 
static FileLogGet ()
 
static FileLogCreateFileLog (const FilePath::StringType &log_name, LogLevel level)
 

Detailed Description

file log handler

Constructor & Destructor Documentation

webdriver::FileLog::FileLog ( const FilePath &  path,
LogLevel  level 
)

Creates a log file at the given path.

virtual webdriver::FileLog::~FileLog ( )
virtual

Member Function Documentation

static FileLog* webdriver::FileLog::CreateFileLog ( const FilePath::StringType &  log_name,
LogLevel  level 
)
static

Creates a log file with the given name in the current directory. If the current directory is not writable, the system's temp directory is used.

Parameters
log_namefile name
levellog level
static FileLog* webdriver::FileLog::Get ( )
static
bool webdriver::FileLog::GetLogContents ( std::string *  contents) const
bool webdriver::FileLog::IsOpen ( ) const

Returns whether the log refers to an open file.

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

add single log item

Parameters
levellog level
timetimestamp
messagelog message

Implements webdriver::LogHandler.

const FilePath& webdriver::FileLog::path ( ) const

Returns the path of the log file. The file is not guaranteed to exist.

void webdriver::FileLog::set_min_log_level ( LogLevel  level)
static void webdriver::FileLog::SetGlobalLog ( FileLog log)
static

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