LogDoctor/docs/html/classLogOps.html

12 KiB

<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> <head> </head>
LogDoctor 2.00
Parse Apache2/Nginx/IIS logs and create statistics
Loading...
Searching...
No Matches

LogOps. More...

#include <logs.h>

Public Types

enum  LogType { Failed = -1 , Discarded = 0 , Access = 1 }
 Enumerates log file types. More...
 

Public Member Functions

const LogType defineFileType (const std::vector< std::string > &lines, const FormatOps::LogsFormat &format) const
 Defines the type of a file. More...
 

Private Member Functions

const bool deepTypeCheck (const std::string &line, const FormatOps::LogsFormat &format) const
 Parse the given line using the given format. More...
 

Detailed Description

LogOps.

Operations for the logs

Member Enumeration Documentation

◆ LogType

Enumerates log file types.

File types used to decide whether a file should be considered valid or not

See also
defineFileType()
Enumerator
Failed 

Failed to determine the type.

Discarded 

Not a valid file, will be discarded.

Access 

Valid access logs file type.

Member Function Documentation

◆ deepTypeCheck()

const bool LogOps::deepTypeCheck ( const std::string &  line,
const FormatOps::LogsFormat format 
) const
private

Parse the given line using the given format.

Parameters
lineThe log line to check
formatThe logs format to use
Returns
Whether the line respects the format or not
See also
defineFileType(), FormatOps::LogsFormat

◆ defineFileType()

const LogOps::LogType LogOps::defineFileType ( const std::vector< std::string > &  lines,
const FormatOps::LogsFormat format 
) const

Defines the type of a file.

Parameters
linesA list of (randomly picked) lines from the file to examine
formatThe logs format to use to determine if the file is valid or not
Returns
The resulting file type
See also
LogType, deepTypeCheck(), FormatOps::LogsFormat

The documentation for this class was generated from the following files:
  • logdoctor/modules/craplog/modules/logs.h
  • logdoctor/modules/craplog/modules/logs.cpp

Generated by doxygen 1.9.5 </html>