| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| <meta name="generator" content="Doxygen 1.8.5"/> |
| <title>Apache Mesos: src/slave/container_loggers/logrotate.hpp Source File</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="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 style="height: 56px;"> |
| <td style="padding-left: 0.5em;"> |
| <div id="projectname">Apache Mesos |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.8.5 --> |
| <div id="navrow1" class="tabs"> |
| <ul class="tablist"> |
| <li><a href="index.html"><span>Main Page</span></a></li> |
| <li><a href="pages.html"><span>Related Pages</span></a></li> |
| <li><a href="namespaces.html"><span>Namespaces</span></a></li> |
| <li><a href="annotated.html"><span>Classes</span></a></li> |
| <li class="current"><a href="files.html"><span>Files</span></a></li> |
| <li><a href="examples.html"><span>Examples</span></a></li> |
| </ul> |
| </div> |
| <div id="navrow2" class="tabs2"> |
| <ul class="tablist"> |
| <li><a href="files.html"><span>File List</span></a></li> |
| <li><a href="globals.html"><span>File Members</span></a></li> |
| </ul> |
| </div> |
| <div id="nav-path" class="navpath"> |
| <ul> |
| <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_80f0d4a0945c74dfa611dba2ec326a39.html">slave</a></li><li class="navelem"><a class="el" href="dir_579d88c8b070a2c745ef26d9577007a4.html">container_loggers</a></li> </ul> |
| </div> |
| </div><!-- top --> |
| <div class="header"> |
| <div class="headertitle"> |
| <div class="title">logrotate.hpp</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| <a href="logrotate_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// Licensed to the Apache Software Foundation (ASF) under one</span></div> |
| <div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// or more contributor license agreements. See the NOTICE file</span></div> |
| <div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// distributed with this work for additional information</span></div> |
| <div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">// regarding copyright ownership. The ASF licenses this file</span></div> |
| <div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// to you under the Apache License, Version 2.0 (the</span></div> |
| <div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">// "License"); you may not use this file except in compliance</span></div> |
| <div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">// with the License. You may obtain a copy of the License at</span></div> |
| <div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">//</span></div> |
| <div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div> |
| <div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">//</span></div> |
| <div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div> |
| <div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div> |
| <div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div> |
| <div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">// See the License for the specific language governing permissions and</span></div> |
| <div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">// limitations under the License.</span></div> |
| <div class="line"><a name="l00016"></a><span class="lineno"> 16</span> </div> |
| <div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#ifndef __SLAVE_CONTAINER_LOGGER_LOGROTATE_HPP__</span></div> |
| <div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor"></span><span class="preprocessor">#define __SLAVE_CONTAINER_LOGGER_LOGROTATE_HPP__</span></div> |
| <div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor"></span></div> |
| <div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <stdio.h></span></div> |
| <div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include <unistd.h></span></div> |
| <div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div> |
| <div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include <<a class="code" href="bytes_8hpp.html">stout/bytes.hpp</a>></span></div> |
| <div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <<a class="code" href="error_8hpp.html">stout/error.hpp</a>></span></div> |
| <div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include <<a class="code" href="3rdparty_2stout_2include_2stout_2flags_8hpp.html">stout/flags.hpp</a>></span></div> |
| <div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <<a class="code" href="option_8hpp.html">stout/option.hpp</a>></span></div> |
| <div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <<a class="code" href="path_8hpp.html">stout/path.hpp</a>></span></div> |
| <div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div> |
| <div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <<a class="code" href="3rdparty_2stout_2include_2stout_2os_2constants_8hpp.html">stout/os/constants.hpp</a>></span></div> |
| <div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include <<a class="code" href="pagesize_8hpp.html">stout/os/pagesize.hpp</a>></span></div> |
| <div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div> |
| <div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div> |
| <div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">namespace </span>mesos {</div> |
| <div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">namespace </span>internal {</div> |
| <div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">namespace </span>logger {</div> |
| <div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1logger_1_1rotate.html"> 36</a></span> <span class="keyword">namespace </span>rotate {</div> |
| <div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div> |
| <div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1logger_1_1rotate.html#aee5dc359a1b6d22c5d912b166c895854"> 38</a></span> <span class="keyword">const</span> std::string <a class="code" href="namespacemesos_1_1internal_1_1logger_1_1rotate.html#aee5dc359a1b6d22c5d912b166c895854">NAME</a> = <span class="stringliteral">"mesos-logrotate-logger"</span>;</div> |
| <div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1logger_1_1rotate.html#a2ff732e40c6b4f02a02444462d5fc484"> 39</a></span> <span class="keyword">const</span> std::string <a class="code" href="namespacemesos_1_1internal_1_1logger_1_1rotate.html#a2ff732e40c6b4f02a02444462d5fc484">CONF_SUFFIX</a> = <span class="stringliteral">".logrotate.conf"</span>;</div> |
| <div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1logger_1_1rotate.html#abf20cb8a71a943cda225a99bb81c26ed"> 40</a></span> <span class="keyword">const</span> std::string <a class="code" href="namespacemesos_1_1internal_1_1logger_1_1rotate.html#abf20cb8a71a943cda225a99bb81c26ed">STATE_SUFFIX</a> = <span class="stringliteral">".logrotate.state"</span>;</div> |
| <div class="line"><a name="l00041"></a><span class="lineno"> 41</span> </div> |
| <div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html"> 42</a></span> <span class="keyword">struct </span><a class="code" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html">Flags</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="classflags_1_1FlagsBase.html">flags::FlagsBase</a></div> |
| <div class="line"><a name="l00043"></a><span class="lineno"> 43</span> {</div> |
| <div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#a908c2b7c0f5b04a8fb5b70f7833ba634"> 44</a></span>  <a class="code" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#a908c2b7c0f5b04a8fb5b70f7833ba634">Flags</a>()</div> |
| <div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  {</div> |
| <div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <a class="code" href="classflags_1_1FlagsBase.html#ac99b7ca8863b671274472f571de0060a">setUsageMessage</a>(</div> |
| <div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="stringliteral">"Usage: "</span> + <a class="code" href="namespacemesos_1_1internal_1_1logger_1_1rotate.html#aee5dc359a1b6d22c5d912b166c895854">NAME</a> + <span class="stringliteral">" [options]\n"</span></div> |
| <div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="stringliteral">"\n"</span></div> |
| <div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="stringliteral">"This command pipes from STDIN to the given leading log file.\n"</span></div> |
| <div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="stringliteral">"When the leading log file reaches '--max_size', the command.\n"</span></div> |
| <div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="stringliteral">"uses 'logrotate' to rotate the logs. All 'logrotate' options\n"</span></div> |
| <div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="stringliteral">"are supported. See '--logrotate_options'.\n"</span></div> |
| <div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="stringliteral">"\n"</span>);</div> |
| <div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div> |
| <div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <a class="code" href="classflags_1_1FlagsBase.html#a09ebe840242a3b0fbd3263bb6c7ca226">add</a>(&<a class="code" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#a9af79512a17ccbec175568aa7c6574ea">Flags::max_size</a>,</div> |
| <div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="stringliteral">"max_size"</span>,</div> |
| <div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="stringliteral">"Maximum size, in bytes, of a single log file.\n"</span></div> |
| <div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="stringliteral">"Defaults to 10 MB. Must be at least 1 (memory) page."</span>,</div> |
| <div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <a class="code" href="classMegabytes.html">Megabytes</a>(10),</div> |
| <div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  [](<span class="keyword">const</span> <a class="code" href="classBytes.html">Bytes</a>& value) -> <a class="code" href="classOption.html">Option<Error></a> {</div> |
| <div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordflow">if</span> (value.<a class="code" href="classBytes.html#a1a2e9277ebe7d227a21f111898c49a8c">bytes</a>() < <a class="code" href="namespaceos.html#af0898f40a19c3804347e30b9efa0984a">os::pagesize</a>()) {</div> |
| <div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(</div> |
| <div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="stringliteral">"Expected --max_size of at least "</span> +</div> |
| <div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <a class="code" href="namespacens.html#a28116b46e6543597a11733424cd1aa20">stringify</a>(<a class="code" href="namespaceos.html#af0898f40a19c3804347e30b9efa0984a">os::pagesize</a>()) + <span class="stringliteral">" bytes"</span>);</div> |
| <div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  }</div> |
| <div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordflow">return</span> <a class="code" href="structNone.html">None</a>();</div> |
| <div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  });</div> |
| <div class="line"><a name="l00068"></a><span class="lineno"> 68</span> </div> |
| <div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <a class="code" href="classflags_1_1FlagsBase.html#a09ebe840242a3b0fbd3263bb6c7ca226">add</a>(&<a class="code" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#ad8a1d00415b5c49cef8b620230a18c0a">Flags::logrotate_options</a>,</div> |
| <div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="stringliteral">"logrotate_options"</span>,</div> |
| <div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="stringliteral">"Additional config options to pass into 'logrotate'.\n"</span></div> |
| <div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="stringliteral">"This string will be inserted into a 'logrotate' configuration file.\n"</span></div> |
| <div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="stringliteral">"i.e.\n"</span></div> |
| <div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="stringliteral">" /path/to/<log_filename> {\n"</span></div> |
| <div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="stringliteral">" <logrotate_options>\n"</span></div> |
| <div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="stringliteral">" size <max_size>\n"</span></div> |
| <div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="stringliteral">" }\n"</span></div> |
| <div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="stringliteral">"NOTE: The 'size' option will be overridden by this command."</span>);</div> |
| <div class="line"><a name="l00079"></a><span class="lineno"> 79</span> </div> |
| <div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <a class="code" href="classflags_1_1FlagsBase.html#a09ebe840242a3b0fbd3263bb6c7ca226">add</a>(&<a class="code" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#aa813ed8c26be59608ca5667c0c267f8b">Flags::log_filename</a>,</div> |
| <div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="stringliteral">"log_filename"</span>,</div> |
| <div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="stringliteral">"Absolute path to the leading log file.\n"</span></div> |
| <div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="stringliteral">"NOTE: This command will also create two files by appending\n"</span></div> |
| <div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="stringliteral">"'"</span> + <a class="code" href="namespacemesos_1_1internal_1_1logger_1_1rotate.html#a2ff732e40c6b4f02a02444462d5fc484">CONF_SUFFIX</a> + <span class="stringliteral">"' and '"</span> + <a class="code" href="namespacemesos_1_1internal_1_1logger_1_1rotate.html#abf20cb8a71a943cda225a99bb81c26ed">STATE_SUFFIX</a> + <span class="stringliteral">"' to the end of\n"</span></div> |
| <div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="stringliteral">"'--log_filename'. These files are used by 'logrotate'."</span>,</div> |
| <div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  [](<span class="keyword">const</span> <a class="code" href="classOption.html">Option<std::string></a>& value) -> <a class="code" href="classOption.html">Option<Error></a> {</div> |
| <div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keywordflow">if</span> (value.<a class="code" href="classOption.html#a06eab791122ebc1f8af4ad310e5e7d7e">isNone</a>()) {</div> |
| <div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(<span class="stringliteral">"Missing required option --log_filename"</span>);</div> |
| <div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  }</div> |
| <div class="line"><a name="l00090"></a><span class="lineno"> 90</span> </div> |
| <div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keywordflow">if</span> (!<a class="code" href="namespacepath.html#a09c4941618b3a4ea2dbfccf5fe9d3687">path::absolute</a>(value.<a class="code" href="classOption.html#a21358442c0fac1cc978a67a9a9089a79">get</a>())) {</div> |
| <div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(<span class="stringliteral">"Expected --log_filename to be an absolute path"</span>);</div> |
| <div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  }</div> |
| <div class="line"><a name="l00094"></a><span class="lineno"> 94</span> </div> |
| <div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keywordflow">return</span> <a class="code" href="structNone.html">None</a>();</div> |
| <div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  });</div> |
| <div class="line"><a name="l00097"></a><span class="lineno"> 97</span> </div> |
| <div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <a class="code" href="classflags_1_1FlagsBase.html#a09ebe840242a3b0fbd3263bb6c7ca226">add</a>(&<a class="code" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#a3e7f68e6e1128e2fb2fa4a84c58aa249">Flags::logrotate_path</a>,</div> |
| <div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="stringliteral">"logrotate_path"</span>,</div> |
| <div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="stringliteral">"If specified, this command will use the specified\n"</span></div> |
| <div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="stringliteral">"'logrotate' instead of the system's 'logrotate'."</span>,</div> |
| <div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="stringliteral">"logrotate"</span>,</div> |
| <div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  [](<span class="keyword">const</span> std::string& value) -> <a class="code" href="classOption.html">Option<Error></a> {</div> |
| <div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="comment">// Check if `logrotate` exists via the help command.</span></div> |
| <div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="comment">// TODO(josephw): Consider a more comprehensive check.</span></div> |
| <div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <a class="code" href="classTry.html">Try<std::string></a> helpCommand =</div> |
| <div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <a class="code" href="namespaceos.html#a0d86320d7799ea761599bc356c02a4fa">os::shell</a>(value + <span class="stringliteral">" --help > "</span> + <a class="code" href="namespaceos.html#a8d90278daa51c4fe9fcb9e54757187b5">os::DEV_NULL</a>);</div> |
| <div class="line"><a name="l00108"></a><span class="lineno"> 108</span> </div> |
| <div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keywordflow">if</span> (helpCommand.<a class="code" href="classTry.html#a0b98f95163b8a38daafd1651b043a276">isError</a>()) {</div> |
| <div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(</div> |
| <div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <span class="stringliteral">"Failed to check logrotate: "</span> + helpCommand.<a class="code" href="classTry.html#aec4a11ddd3c036e889d90b7eb6258ba7">error</a>());</div> |
| <div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  }</div> |
| <div class="line"><a name="l00113"></a><span class="lineno"> 113</span> </div> |
| <div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="keywordflow">return</span> <a class="code" href="structNone.html">None</a>();</div> |
| <div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  });</div> |
| <div class="line"><a name="l00116"></a><span class="lineno"> 116</span> </div> |
| <div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <a class="code" href="classflags_1_1FlagsBase.html#a09ebe840242a3b0fbd3263bb6c7ca226">add</a>(&<a class="code" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#a497482526f73fe8ee8249c28d49fd22f">Flags::user</a>,</div> |
| <div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="stringliteral">"user"</span>,</div> |
| <div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="stringliteral">"The user this command should run as."</span>);</div> |
| <div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  }</div> |
| <div class="line"><a name="l00121"></a><span class="lineno"> 121</span> </div> |
| <div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#a9af79512a17ccbec175568aa7c6574ea"> 122</a></span>  <a class="code" href="classBytes.html">Bytes</a> <a class="code" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#a9af79512a17ccbec175568aa7c6574ea">max_size</a>;</div> |
| <div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#ad8a1d00415b5c49cef8b620230a18c0a"> 123</a></span>  <a class="code" href="classOption.html">Option<std::string></a> <a class="code" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#ad8a1d00415b5c49cef8b620230a18c0a">logrotate_options</a>;</div> |
| <div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#aa813ed8c26be59608ca5667c0c267f8b"> 124</a></span>  <a class="code" href="classOption.html">Option<std::string></a> <a class="code" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#aa813ed8c26be59608ca5667c0c267f8b">log_filename</a>;</div> |
| <div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#a3e7f68e6e1128e2fb2fa4a84c58aa249"> 125</a></span>  std::string <a class="code" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#a3e7f68e6e1128e2fb2fa4a84c58aa249">logrotate_path</a>;</div> |
| <div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#a497482526f73fe8ee8249c28d49fd22f"> 126</a></span>  <a class="code" href="classOption.html">Option<std::string></a> <a class="code" href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#a497482526f73fe8ee8249c28d49fd22f">user</a>;</div> |
| <div class="line"><a name="l00127"></a><span class="lineno"> 127</span> };</div> |
| <div class="line"><a name="l00128"></a><span class="lineno"> 128</span> </div> |
| <div class="line"><a name="l00129"></a><span class="lineno"> 129</span> } <span class="comment">// namespace rotate {</span></div> |
| <div class="line"><a name="l00130"></a><span class="lineno"> 130</span> } <span class="comment">// namespace logger {</span></div> |
| <div class="line"><a name="l00131"></a><span class="lineno"> 131</span> } <span class="comment">// namespace internal {</span></div> |
| <div class="line"><a name="l00132"></a><span class="lineno"> 132</span> } <span class="comment">// namespace mesos {</span></div> |
| <div class="line"><a name="l00133"></a><span class="lineno"> 133</span> </div> |
| <div class="line"><a name="l00134"></a><span class="lineno"> 134</span> <span class="preprocessor">#endif // __SLAVE_CONTAINER_LOGGER_LOGROTATE_HPP__</span></div> |
| <div class="ttc" id="classError_html"><div class="ttname"><a href="classError.html">Error</a></div><div class="ttdef"><b>Definition:</b> errorbase.hpp:35</div></div> |
| <div class="ttc" id="classOption_html"><div class="ttname"><a href="classOption.html">Option< Error ></a></div></div> |
| <div class="ttc" id="classTry_html"><div class="ttname"><a href="classTry.html">Try</a></div><div class="ttdef"><b>Definition:</b> try.hpp:34</div></div> |
| <div class="ttc" id="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags_html"><div class="ttname"><a href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html">mesos::internal::logger::rotate::Flags</a></div><div class="ttdef"><b>Definition:</b> logrotate.hpp:42</div></div> |
| <div class="ttc" id="namespaceos_html_af0898f40a19c3804347e30b9efa0984a"><div class="ttname"><a href="namespaceos.html#af0898f40a19c3804347e30b9efa0984a">os::pagesize</a></div><div class="ttdeci">size_t pagesize()</div><div class="ttdef"><b>Definition:</b> pagesize.hpp:24</div></div> |
| <div class="ttc" id="namespacemesos_1_1internal_1_1logger_1_1rotate_html_abf20cb8a71a943cda225a99bb81c26ed"><div class="ttname"><a href="namespacemesos_1_1internal_1_1logger_1_1rotate.html#abf20cb8a71a943cda225a99bb81c26ed">mesos::internal::logger::rotate::STATE_SUFFIX</a></div><div class="ttdeci">const std::string STATE_SUFFIX</div><div class="ttdef"><b>Definition:</b> logrotate.hpp:40</div></div> |
| <div class="ttc" id="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags_html_a9af79512a17ccbec175568aa7c6574ea"><div class="ttname"><a href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#a9af79512a17ccbec175568aa7c6574ea">mesos::internal::logger::rotate::Flags::max_size</a></div><div class="ttdeci">Bytes max_size</div><div class="ttdef"><b>Definition:</b> logrotate.hpp:122</div></div> |
| <div class="ttc" id="namespacemesos_1_1internal_1_1logger_1_1rotate_html_aee5dc359a1b6d22c5d912b166c895854"><div class="ttname"><a href="namespacemesos_1_1internal_1_1logger_1_1rotate.html#aee5dc359a1b6d22c5d912b166c895854">mesos::internal::logger::rotate::NAME</a></div><div class="ttdeci">const std::string NAME</div><div class="ttdef"><b>Definition:</b> logrotate.hpp:38</div></div> |
| <div class="ttc" id="namespacemesos_1_1internal_1_1logger_1_1rotate_html_a2ff732e40c6b4f02a02444462d5fc484"><div class="ttname"><a href="namespacemesos_1_1internal_1_1logger_1_1rotate.html#a2ff732e40c6b4f02a02444462d5fc484">mesos::internal::logger::rotate::CONF_SUFFIX</a></div><div class="ttdeci">const std::string CONF_SUFFIX</div><div class="ttdef"><b>Definition:</b> logrotate.hpp:39</div></div> |
| <div class="ttc" id="namespacepath_html_a09c4941618b3a4ea2dbfccf5fe9d3687"><div class="ttname"><a href="namespacepath.html#a09c4941618b3a4ea2dbfccf5fe9d3687">path::absolute</a></div><div class="ttdeci">bool absolute(const std::string &path)</div><div class="ttdef"><b>Definition:</b> path.hpp:65</div></div> |
| <div class="ttc" id="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags_html_a497482526f73fe8ee8249c28d49fd22f"><div class="ttname"><a href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#a497482526f73fe8ee8249c28d49fd22f">mesos::internal::logger::rotate::Flags::user</a></div><div class="ttdeci">Option< std::string > user</div><div class="ttdef"><b>Definition:</b> logrotate.hpp:126</div></div> |
| <div class="ttc" id="bytes_8hpp_html"><div class="ttname"><a href="bytes_8hpp.html">bytes.hpp</a></div></div> |
| <div class="ttc" id="path_8hpp_html"><div class="ttname"><a href="path_8hpp.html">path.hpp</a></div></div> |
| <div class="ttc" id="classMegabytes_html"><div class="ttname"><a href="classMegabytes.html">Megabytes</a></div><div class="ttdef"><b>Definition:</b> bytes.hpp:131</div></div> |
| <div class="ttc" id="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags_html_a3e7f68e6e1128e2fb2fa4a84c58aa249"><div class="ttname"><a href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#a3e7f68e6e1128e2fb2fa4a84c58aa249">mesos::internal::logger::rotate::Flags::logrotate_path</a></div><div class="ttdeci">std::string logrotate_path</div><div class="ttdef"><b>Definition:</b> logrotate.hpp:125</div></div> |
| <div class="ttc" id="classflags_1_1FlagsBase_html"><div class="ttname"><a href="classflags_1_1FlagsBase.html">flags::FlagsBase</a></div><div class="ttdef"><b>Definition:</b> flags.hpp:44</div></div> |
| <div class="ttc" id="classflags_1_1FlagsBase_html_ac99b7ca8863b671274472f571de0060a"><div class="ttname"><a href="classflags_1_1FlagsBase.html#ac99b7ca8863b671274472f571de0060a">flags::FlagsBase::setUsageMessage</a></div><div class="ttdeci">void setUsageMessage(const std::string &message)</div><div class="ttdef"><b>Definition:</b> flags.hpp:164</div></div> |
| <div class="ttc" id="3rdparty_2stout_2include_2stout_2flags_8hpp_html"><div class="ttname"><a href="3rdparty_2stout_2include_2stout_2flags_8hpp.html">flags.hpp</a></div></div> |
| <div class="ttc" id="classOption_html_a21358442c0fac1cc978a67a9a9089a79"><div class="ttname"><a href="classOption.html#a21358442c0fac1cc978a67a9a9089a79">Option::get</a></div><div class="ttdeci">const T & get() const &</div><div class="ttdef"><b>Definition:</b> option.hpp:111</div></div> |
| <div class="ttc" id="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags_html_a908c2b7c0f5b04a8fb5b70f7833ba634"><div class="ttname"><a href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#a908c2b7c0f5b04a8fb5b70f7833ba634">mesos::internal::logger::rotate::Flags::Flags</a></div><div class="ttdeci">Flags()</div><div class="ttdef"><b>Definition:</b> logrotate.hpp:44</div></div> |
| <div class="ttc" id="option_8hpp_html"><div class="ttname"><a href="option_8hpp.html">option.hpp</a></div></div> |
| <div class="ttc" id="classTry_html_aec4a11ddd3c036e889d90b7eb6258ba7"><div class="ttname"><a href="classTry.html#aec4a11ddd3c036e889d90b7eb6258ba7">Try::error</a></div><div class="ttdeci">static Try error(const E &e)</div><div class="ttdef"><b>Definition:</b> try.hpp:42</div></div> |
| <div class="ttc" id="pagesize_8hpp_html"><div class="ttname"><a href="pagesize_8hpp.html">pagesize.hpp</a></div></div> |
| <div class="ttc" id="namespaceos_html_a0d86320d7799ea761599bc356c02a4fa"><div class="ttname"><a href="namespaceos.html#a0d86320d7799ea761599bc356c02a4fa">os::shell</a></div><div class="ttdeci">Try< std::string > shell(const std::string &fmt, const T &...t)</div><div class="ttdoc">Runs a shell command with optional arguments. </div><div class="ttdef"><b>Definition:</b> shell.hpp:71</div></div> |
| <div class="ttc" id="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags_html_aa813ed8c26be59608ca5667c0c267f8b"><div class="ttname"><a href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#aa813ed8c26be59608ca5667c0c267f8b">mesos::internal::logger::rotate::Flags::log_filename</a></div><div class="ttdeci">Option< std::string > log_filename</div><div class="ttdef"><b>Definition:</b> logrotate.hpp:124</div></div> |
| <div class="ttc" id="error_8hpp_html"><div class="ttname"><a href="error_8hpp.html">error.hpp</a></div></div> |
| <div class="ttc" id="structNone_html"><div class="ttname"><a href="structNone.html">None</a></div><div class="ttdef"><b>Definition:</b> none.hpp:27</div></div> |
| <div class="ttc" id="classTry_html_a0b98f95163b8a38daafd1651b043a276"><div class="ttname"><a href="classTry.html#a0b98f95163b8a38daafd1651b043a276">Try::isError</a></div><div class="ttdeci">bool isError() const </div><div class="ttdef"><b>Definition:</b> try.hpp:71</div></div> |
| <div class="ttc" id="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags_html_ad8a1d00415b5c49cef8b620230a18c0a"><div class="ttname"><a href="structmesos_1_1internal_1_1logger_1_1rotate_1_1Flags.html#ad8a1d00415b5c49cef8b620230a18c0a">mesos::internal::logger::rotate::Flags::logrotate_options</a></div><div class="ttdeci">Option< std::string > logrotate_options</div><div class="ttdef"><b>Definition:</b> logrotate.hpp:123</div></div> |
| <div class="ttc" id="namespaceos_html_a8d90278daa51c4fe9fcb9e54757187b5"><div class="ttname"><a href="namespaceos.html#a8d90278daa51c4fe9fcb9e54757187b5">os::DEV_NULL</a></div><div class="ttdeci">constexpr char DEV_NULL[]</div><div class="ttdef"><b>Definition:</b> constants.hpp:30</div></div> |
| <div class="ttc" id="classBytes_html_a1a2e9277ebe7d227a21f111898c49a8c"><div class="ttname"><a href="classBytes.html#a1a2e9277ebe7d227a21f111898c49a8c">Bytes::bytes</a></div><div class="ttdeci">uint64_t bytes() const </div><div class="ttdef"><b>Definition:</b> bytes.hpp:75</div></div> |
| <div class="ttc" id="classflags_1_1FlagsBase_html_a09ebe840242a3b0fbd3263bb6c7ca226"><div class="ttname"><a href="classflags_1_1FlagsBase.html#a09ebe840242a3b0fbd3263bb6c7ca226">flags::FlagsBase::add</a></div><div class="ttdeci">void add(T1 Flags::*t1, const Name &name, const Option< Name > &alias, const std::string &help, const T2 *t2, F validate)</div><div class="ttdef"><b>Definition:</b> flags.hpp:333</div></div> |
| <div class="ttc" id="classOption_html_a06eab791122ebc1f8af4ad310e5e7d7e"><div class="ttname"><a href="classOption.html#a06eab791122ebc1f8af4ad310e5e7d7e">Option::isNone</a></div><div class="ttdeci">bool isNone() const </div><div class="ttdef"><b>Definition:</b> option.hpp:109</div></div> |
| <div class="ttc" id="classBytes_html"><div class="ttname"><a href="classBytes.html">Bytes</a></div><div class="ttdef"><b>Definition:</b> bytes.hpp:30</div></div> |
| <div class="ttc" id="namespacens_html_a28116b46e6543597a11733424cd1aa20"><div class="ttname"><a href="namespacens.html#a28116b46e6543597a11733424cd1aa20">ns::stringify</a></div><div class="ttdeci">std::string stringify(int flags)</div><div class="ttdef"><b>Definition:</b> ns.hpp:688</div></div> |
| <div class="ttc" id="3rdparty_2stout_2include_2stout_2os_2constants_8hpp_html"><div class="ttname"><a href="3rdparty_2stout_2include_2stout_2os_2constants_8hpp.html">constants.hpp</a></div></div> |
| </div><!-- fragment --></div><!-- contents --> |
| <!-- start footer part --> |
| <hr class="footer"/><address class="footer"><small> |
| Generated by  <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/> |
| </a> 1.8.5 |
| </small></address> |
| </body> |
| </html> |