• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Function add_common_attributes</title>
5<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../index.html" title="Chapter 1. Boost.Log v2">
8<link rel="up" href="../../utilities.html#header.boost.log.utility.setup.common_attributes_hpp" title="Header &lt;boost/log/utility/setup/common_attributes.hpp&gt;">
9<link rel="prev" href="make_att_idm46079573286064.html" title="Function template make_attr_ordering">
10<link rel="next" href="add_cons_idm46079573266560.html" title="Function template add_console_log">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
14<hr>
15<div class="spirit-nav">
16<a accesskey="p" href="make_att_idm46079573286064.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.setup.common_attributes_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="add_cons_idm46079573266560.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
17</div>
18<div class="refentry">
19<a name="boost.log.add_common_attributes"></a><div class="titlepage"></div>
20<div class="refnamediv">
21<h2><span class="refentrytitle">Function add_common_attributes</span></h2>
22<p>boost::log::add_common_attributes — Simple attribute initialization routine. </p>
23</div>
24<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
25<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../utilities.html#header.boost.log.utility.setup.common_attributes_hpp" title="Header &lt;boost/log/utility/setup/common_attributes.hpp&gt;">boost/log/utility/setup/common_attributes.hpp</a>&gt;
26
27</span>
28<span class="keyword">void</span> <span class="identifier">add_common_attributes</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></div>
29<div class="refsect1">
30<a name="idm44984852077280"></a><h2>Description</h2>
31<p>The function adds commonly used attributes to the logging system. Specifically, the following attributes are registered globally:</p>
32<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
33<li class="listitem"><p>LineID - logging records counter with value type <code class="computeroutput">unsigned int</code> </p></li>
34<li class="listitem"><p>TimeStamp - local time generator with value type <code class="computeroutput">boost::posix_time::ptime</code> </p></li>
35<li class="listitem"><p>ProcessID - current process identifier with value type <code class="computeroutput">attributes::current_process_id::value_type</code> </p></li>
36<li class="listitem"><p>ThreadID - in multithreaded builds, current thread identifier with value type <code class="computeroutput">attributes::current_thread_id::value_type</code> </p></li>
37</ul></div>
38<p>
39</p>
40</div>
41</div>
42<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
43<td align="left"></td>
44<td align="right"><div class="copyright-footer">Copyright © 2007-2019 Andrey Semashev<p>
45        Distributed under the Boost Software License, Version 1.0. (See accompanying
46        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>).
47      </p>
48</div></td>
49</tr></table>
50<hr>
51<div class="spirit-nav">
52<a accesskey="p" href="make_att_idm46079573286064.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.setup.common_attributes_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="add_cons_idm46079573266560.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
53</div>
54</body>
55</html>
56