LogDoctor/docs/html/classFormatOps.html

623 lines
34 KiB
HTML
Raw Normal View History

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LogDoctor: FormatOps Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="dox_logo.png"/></td>
<td id="projectalign">
<div id="projectname">LogDoctor<span id="projectnumber">&#160;2.00</span>
</div>
<div id="projectbrief">Parse Apache2/Nginx/IIS logs and create statistics</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classFormatOps-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">FormatOps Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="classFormatOps.html" title="FormatOps.">FormatOps</a>.
<a href="classFormatOps.html#details">More...</a></p>
<p><code>#include &lt;formats.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structFormatOps_1_1LogsFormat.html">LogsFormat</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Structure which holds informations about a log format. <a href="structFormatOps_1_1LogsFormat.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a9bc720b012546f34b3f844459089a29d"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structFormatOps_1_1LogsFormat.html">LogsFormat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormatOps.html#a9bc720b012546f34b3f844459089a29d">processApacheFormatString</a> (const std::string &amp;format_string)</td></tr>
<tr class="memdesc:a9bc720b012546f34b3f844459089a29d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Processes the given string to extrapolate the format for Apache2. <a href="classFormatOps.html#a9bc720b012546f34b3f844459089a29d">More...</a><br /></td></tr>
<tr class="separator:a9bc720b012546f34b3f844459089a29d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e4c9fb02220492ce2766e830f4fedc6"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structFormatOps_1_1LogsFormat.html">LogsFormat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormatOps.html#a9e4c9fb02220492ce2766e830f4fedc6">processNginxFormatString</a> (const std::string &amp;format_string)</td></tr>
<tr class="memdesc:a9e4c9fb02220492ce2766e830f4fedc6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Processes the given string to extrapolate the format for Nginx. <a href="classFormatOps.html#a9e4c9fb02220492ce2766e830f4fedc6">More...</a><br /></td></tr>
<tr class="separator:a9e4c9fb02220492ce2766e830f4fedc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc7446da6389b522922cb94c4319f4ec"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structFormatOps_1_1LogsFormat.html">LogsFormat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormatOps.html#afc7446da6389b522922cb94c4319f4ec">processIisFormatString</a> (const std::string &amp;format_string, const int &amp;log_module)</td></tr>
<tr class="memdesc:afc7446da6389b522922cb94c4319f4ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Processes the given string to extrapolate the format for the IIS. <a href="classFormatOps.html#afc7446da6389b522922cb94c4319f4ec">More...</a><br /></td></tr>
<tr class="separator:afc7446da6389b522922cb94c4319f4ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a034a9f4fd9baeefaaa8adf07107f0930"><td class="memItemLeft" align="right" valign="top">const QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormatOps.html#a034a9f4fd9baeefaaa8adf07107f0930">getApacheLogSample</a> (const <a class="el" href="structFormatOps_1_1LogsFormat.html">LogsFormat</a> &amp;log_format)</td></tr>
<tr class="memdesc:a034a9f4fd9baeefaaa8adf07107f0930"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a log line sample based on the given format. <a href="classFormatOps.html#a034a9f4fd9baeefaaa8adf07107f0930">More...</a><br /></td></tr>
<tr class="separator:a034a9f4fd9baeefaaa8adf07107f0930"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46cc3ff63986ec4437c20ccbd68569c2"><td class="memItemLeft" align="right" valign="top">const QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormatOps.html#a46cc3ff63986ec4437c20ccbd68569c2">getNginxLogSample</a> (const <a class="el" href="structFormatOps_1_1LogsFormat.html">LogsFormat</a> &amp;log_format)</td></tr>
<tr class="memdesc:a46cc3ff63986ec4437c20ccbd68569c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a log line sample based on the given format. <a href="classFormatOps.html#a46cc3ff63986ec4437c20ccbd68569c2">More...</a><br /></td></tr>
<tr class="separator:a46cc3ff63986ec4437c20ccbd68569c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fe9ff3f875e96c0866622f1a60f29b5"><td class="memItemLeft" align="right" valign="top">const QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormatOps.html#a1fe9ff3f875e96c0866622f1a60f29b5">getIisLogSample</a> (const <a class="el" href="structFormatOps_1_1LogsFormat.html">LogsFormat</a> &amp;log_format)</td></tr>
<tr class="memdesc:a1fe9ff3f875e96c0866622f1a60f29b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a log line sample based on the given format. <a href="classFormatOps.html#a1fe9ff3f875e96c0866622f1a60f29b5">More...</a><br /></td></tr>
<tr class="separator:a1fe9ff3f875e96c0866622f1a60f29b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-methods" name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:aea7c5e264f8a40c92cd39916ff75b02b"><td class="memItemLeft" align="right" valign="top">const std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormatOps.html#aea7c5e264f8a40c92cd39916ff75b02b">parseApacheEscapes</a> (const std::string &amp;string, const bool &amp;strftime=false)</td></tr>
<tr class="memdesc:aea7c5e264f8a40c92cd39916ff75b02b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses the escapes (backslashes) and returns the resulting string. <a href="classFormatOps.html#aea7c5e264f8a40c92cd39916ff75b02b">More...</a><br /></td></tr>
<tr class="separator:aea7c5e264f8a40c92cd39916ff75b02b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8a4f2b2f78807f7156932233d7977fe"><td class="memItemLeft" align="right" valign="top">const std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormatOps.html#aa8a4f2b2f78807f7156932233d7977fe">parseNginxEscapes</a> (const std::string &amp;string)</td></tr>
<tr class="memdesc:aa8a4f2b2f78807f7156932233d7977fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses the escapes (backslashes) and returns the resulting string. <a href="classFormatOps.html#aa8a4f2b2f78807f7156932233d7977fe">More...</a><br /></td></tr>
<tr class="separator:aa8a4f2b2f78807f7156932233d7977fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec634128bb1ded97288c43c569591a6a"><td class="memItemLeft" align="right" valign="top">const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormatOps.html#aec634128bb1ded97288c43c569591a6a">countNewLines</a> (const std::string &amp;initial, const std::string &amp;final, const std::vector&lt; std::string &gt; &amp;separators)</td></tr>
<tr class="memdesc:aec634128bb1ded97288c43c569591a6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Conuts how many new lines are there in the format. <a href="classFormatOps.html#aec634128bb1ded97288c43c569591a6a">More...</a><br /></td></tr>
<tr class="separator:aec634128bb1ded97288c43c569591a6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd7a77e8576787118fb22a540daea795"><td class="memItemLeft" align="right" valign="top">const size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormatOps.html#abd7a77e8576787118fb22a540daea795">findNginxFieldEnd</a> (const std::string &amp;string, const int &amp;start)</td></tr>
<tr class="memdesc:abd7a77e8576787118fb22a540daea795"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the end of a Nginx log field. <a href="classFormatOps.html#abd7a77e8576787118fb22a540daea795">More...</a><br /></td></tr>
<tr class="separator:abd7a77e8576787118fb22a540daea795"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d16a895af9986503a05459f014bc6f9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormatOps.html#a4d16a895af9986503a05459f014bc6f9">checkIisString</a> (const std::string &amp;string)</td></tr>
<tr class="memdesc:a4d16a895af9986503a05459f014bc6f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the format string contains invalid characters or not. <a href="classFormatOps.html#a4d16a895af9986503a05459f014bc6f9">More...</a><br /></td></tr>
<tr class="separator:a4d16a895af9986503a05459f014bc6f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a1dd258c0c0bb9091e25c2b36c47b5ad1"><td class="memItemLeft" align="right" valign="top">const std::unordered_map&lt; std::string, std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormatOps.html#a1dd258c0c0bb9091e25c2b36c47b5ad1">APACHE_ALF</a></td></tr>
<tr class="memdesc:a1dd258c0c0bb9091e25c2b36c47b5ad1"><td class="mdescLeft">&#160;</td><td class="mdescRight">&lt; Access logs fields formats <a href="classFormatOps.html#a1dd258c0c0bb9091e25c2b36c47b5ad1">More...</a><br /></td></tr>
<tr class="separator:a1dd258c0c0bb9091e25c2b36c47b5ad1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0489127a5f5a7cca1ae9386a3935fa2d"><td class="memItemLeft" align="right" valign="top"><a id="a0489127a5f5a7cca1ae9386a3935fa2d" name="a0489127a5f5a7cca1ae9386a3935fa2d"></a>
const std::unordered_map&lt; std::string, std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>NGINX_ALF</b></td></tr>
<tr class="memdesc:a0489127a5f5a7cca1ae9386a3935fa2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">&lt; Access logs fields formats <br /></td></tr>
<tr class="separator:a0489127a5f5a7cca1ae9386a3935fa2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4afc65bbc4887342cbb36381a26c3ba"><td class="memItemLeft" align="right" valign="top"><a id="aa4afc65bbc4887342cbb36381a26c3ba" name="aa4afc65bbc4887342cbb36381a26c3ba"></a>
const std::unordered_map&lt; std::string, std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>IIS_ALF</b></td></tr>
<tr class="memdesc:aa4afc65bbc4887342cbb36381a26c3ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">&lt; Access logs fields formats <br /></td></tr>
<tr class="separator:aa4afc65bbc4887342cbb36381a26c3ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p ><a class="el" href="classFormatOps.html" title="FormatOps.">FormatOps</a>. </p>
<p >Operations for the logs formats </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a4d16a895af9986503a05459f014bc6f9" name="a4d16a895af9986503a05459f014bc6f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d16a895af9986503a05459f014bc6f9">&#9670;&#160;</a></span>checkIisString()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void FormatOps::checkIisString </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>string</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks whether the format string contains invalid characters or not. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">string</td><td>The format string </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classLogFormatException.html" title="LogFormatException.">LogFormatException</a></td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classFormatOps.html#afc7446da6389b522922cb94c4319f4ec" title="Processes the given string to extrapolate the format for the IIS.">processIisFormatString</a> </dd></dl>
</div>
</div>
<a id="aec634128bb1ded97288c43c569591a6a" name="aec634128bb1ded97288c43c569591a6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec634128bb1ded97288c43c569591a6a">&#9670;&#160;</a></span>countNewLines()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const int FormatOps::countNewLines </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>initial</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>final</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; std::string &gt; &amp;&#160;</td>
<td class="paramname"><em>separators</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Conuts how many new lines are there in the format. </p>
<p >Used to join log lines which refer to the same log line </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">initial</td><td>The initial separator </td></tr>
<tr><td class="paramname">final</td><td>The final separator </td></tr>
<tr><td class="paramname">separators</td><td>The separators in the middle </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of new lines in a single log line </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structFormatOps_1_1LogsFormat.html" title="Structure which holds informations about a log format.">LogsFormat</a>, <a class="el" href="classFormatOps.html#a9bc720b012546f34b3f844459089a29d" title="Processes the given string to extrapolate the format for Apache2.">processApacheFormatString()</a>, <a class="el" href="classFormatOps.html#a9e4c9fb02220492ce2766e830f4fedc6" title="Processes the given string to extrapolate the format for Nginx.">processNginxFormatString()</a> </dd></dl>
</div>
</div>
<a id="abd7a77e8576787118fb22a540daea795" name="abd7a77e8576787118fb22a540daea795"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd7a77e8576787118fb22a540daea795">&#9670;&#160;</a></span>findNginxFieldEnd()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const size_t FormatOps::findNginxFieldEnd </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>string</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const int &amp;&#160;</td>
<td class="paramname"><em>start</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Finds the end of a Nginx log field. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">string</td><td>The format string </td></tr>
<tr><td class="paramname">start</td><td>The starting point of the field in the string </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The ending poin of the field in the string </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classFormatOps.html#a9e4c9fb02220492ce2766e830f4fedc6" title="Processes the given string to extrapolate the format for Nginx.">processNginxFormatString()</a> </dd></dl>
</div>
</div>
<a id="a034a9f4fd9baeefaaa8adf07107f0930" name="a034a9f4fd9baeefaaa8adf07107f0930"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a034a9f4fd9baeefaaa8adf07107f0930">&#9670;&#160;</a></span>getApacheLogSample()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const QString FormatOps::getApacheLogSample </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structFormatOps_1_1LogsFormat.html">LogsFormat</a> &amp;&#160;</td>
<td class="paramname"><em>log_format</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a log line sample based on the given format. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">log_format</td><td>The logs format to use to build the sample </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The sample line </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structFormatOps_1_1LogsFormat.html" title="Structure which holds informations about a log format.">LogsFormat</a>, <a class="el" href="classCraplog.html#ae772867818dcfac15eba8f94da7f0493" title="Returns a sample log line for the given Web Server using the relative LogsFormat.">Craplog::getLogsFormatSample()</a> </dd></dl>
</div>
</div>
<a id="a1fe9ff3f875e96c0866622f1a60f29b5" name="a1fe9ff3f875e96c0866622f1a60f29b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1fe9ff3f875e96c0866622f1a60f29b5">&#9670;&#160;</a></span>getIisLogSample()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const QString FormatOps::getIisLogSample </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structFormatOps_1_1LogsFormat.html">LogsFormat</a> &amp;&#160;</td>
<td class="paramname"><em>log_format</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a log line sample based on the given format. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">log_format</td><td>The logs format to use to build the sample </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The sample line </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structFormatOps_1_1LogsFormat.html" title="Structure which holds informations about a log format.">LogsFormat</a>, <a class="el" href="classCraplog.html#ae772867818dcfac15eba8f94da7f0493" title="Returns a sample log line for the given Web Server using the relative LogsFormat.">Craplog::getLogsFormatSample()</a> </dd></dl>
</div>
</div>
<a id="a46cc3ff63986ec4437c20ccbd68569c2" name="a46cc3ff63986ec4437c20ccbd68569c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a46cc3ff63986ec4437c20ccbd68569c2">&#9670;&#160;</a></span>getNginxLogSample()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const QString FormatOps::getNginxLogSample </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structFormatOps_1_1LogsFormat.html">LogsFormat</a> &amp;&#160;</td>
<td class="paramname"><em>log_format</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a log line sample based on the given format. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">log_format</td><td>The logs format to use to build the sample </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The sample line </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structFormatOps_1_1LogsFormat.html" title="Structure which holds informations about a log format.">LogsFormat</a>, <a class="el" href="classCraplog.html#ae772867818dcfac15eba8f94da7f0493" title="Returns a sample log line for the given Web Server using the relative LogsFormat.">Craplog::getLogsFormatSample()</a> </dd></dl>
</div>
</div>
<a id="aea7c5e264f8a40c92cd39916ff75b02b" name="aea7c5e264f8a40c92cd39916ff75b02b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aea7c5e264f8a40c92cd39916ff75b02b">&#9670;&#160;</a></span>parseApacheEscapes()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const std::string FormatOps::parseApacheEscapes </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>string</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool &amp;&#160;</td>
<td class="paramname"><em>strftime</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Parses the escapes (backslashes) and returns the resulting string. </p>
<p >Used to obtain the same result as on Apache2 </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">string</td><td>The string to parse </td></tr>
<tr><td class="paramname">strftime</td><td>Whether to apply the strftime special rule when parsing or not </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The resulting string </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classLogFormatException.html" title="LogFormatException.">LogFormatException</a></td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classFormatOps.html#a9bc720b012546f34b3f844459089a29d" title="Processes the given string to extrapolate the format for Apache2.">processApacheFormatString()</a> </dd></dl>
</div>
</div>
<a id="aa8a4f2b2f78807f7156932233d7977fe" name="aa8a4f2b2f78807f7156932233d7977fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8a4f2b2f78807f7156932233d7977fe">&#9670;&#160;</a></span>parseNginxEscapes()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const std::string FormatOps::parseNginxEscapes </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>string</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Parses the escapes (backslashes) and returns the resulting string. </p>
<p >Used to obtain the same result as on Nginx </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">string</td><td>The string to parse </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The resulting string </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classLogFormatException.html" title="LogFormatException.">LogFormatException</a></td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classFormatOps.html#a9e4c9fb02220492ce2766e830f4fedc6" title="Processes the given string to extrapolate the format for Nginx.">processNginxFormatString()</a> </dd></dl>
</div>
</div>
<a id="a9bc720b012546f34b3f844459089a29d" name="a9bc720b012546f34b3f844459089a29d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9bc720b012546f34b3f844459089a29d">&#9670;&#160;</a></span>processApacheFormatString()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="structFormatOps_1_1LogsFormat.html">FormatOps::LogsFormat</a> FormatOps::processApacheFormatString </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>format_string</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Processes the given string to extrapolate the format for Apache2. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">format_string</td><td>The format string to process </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The logs format </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classLogFormatException.html" title="LogFormatException.">LogFormatException</a></td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structFormatOps_1_1LogsFormat.html" title="Structure which holds informations about a log format.">LogsFormat</a> </dd></dl>
</div>
</div>
<a id="afc7446da6389b522922cb94c4319f4ec" name="afc7446da6389b522922cb94c4319f4ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc7446da6389b522922cb94c4319f4ec">&#9670;&#160;</a></span>processIisFormatString()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="structFormatOps_1_1LogsFormat.html">FormatOps::LogsFormat</a> FormatOps::processIisFormatString </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>format_string</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const int &amp;&#160;</td>
<td class="paramname"><em>log_module</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Processes the given string to extrapolate the format for the IIS. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">format_string</td><td>The format string to process </td></tr>
<tr><td class="paramname">log_module</td><td>The ID of the log module to use </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The logs format </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classLogFormatException.html" title="LogFormatException.">LogFormatException</a></td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structFormatOps_1_1LogsFormat.html" title="Structure which holds informations about a log format.">LogsFormat</a> </dd></dl>
</div>
</div>
<a id="a9e4c9fb02220492ce2766e830f4fedc6" name="a9e4c9fb02220492ce2766e830f4fedc6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e4c9fb02220492ce2766e830f4fedc6">&#9670;&#160;</a></span>processNginxFormatString()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="structFormatOps_1_1LogsFormat.html">FormatOps::LogsFormat</a> FormatOps::processNginxFormatString </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>format_string</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Processes the given string to extrapolate the format for Nginx. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">format_string</td><td>The format string to process </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The logs format </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classLogFormatException.html" title="LogFormatException.">LogFormatException</a></td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structFormatOps_1_1LogsFormat.html" title="Structure which holds informations about a log format.">LogsFormat</a> </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a1dd258c0c0bb9091e25c2b36c47b5ad1" name="a1dd258c0c0bb9091e25c2b36c47b5ad1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1dd258c0c0bb9091e25c2b36c47b5ad1">&#9670;&#160;</a></span>APACHE_ALF</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const std::unordered_map&lt;std::string, std::string&gt; FormatOps::APACHE_ALF</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>&lt; Access logs fields formats </p>
<p >Composed access logs fields formats </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>logdoctor/modules/craplog/modules/formats.h</li>
<li>logdoctor/modules/craplog/modules/formats.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>