LogFormat.cci
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
6 //
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
11 //
12 
13 
14 /** \file
15  \brief LogFormat inline non-template implementation */
16 
17 //#include "LogFormat.ih"
18 
19 // Custom includes
20 
21 #define prefix_ inline
22 //-/////////////////////////////////////////////////////////////////////////////////////////////////
23 
24 prefix_ void senf::log::detail::LogFormat::showTime(bool flag)
25 {
26  showTime_ = flag;
27 }
28 
29 prefix_ void senf::log::detail::LogFormat::showStream(bool flag)
30 {
31  showStream_ = flag;
32 }
33 
34 prefix_ void senf::log::detail::LogFormat::showLevel(bool flag)
35 {
36  showLevel_ = flag;
37 }
38 
39 prefix_ void senf::log::detail::LogFormat::showArea(bool flag)
40 {
41  showArea_ = flag;
42 }
43 
44 prefix_ void senf::log::detail::LogFormat::tag(std::string const & tag)
45 {
46  tag_ = tag;
47 }
48 
49 prefix_ bool senf::log::detail::LogFormat::isPlainFormat()
50  const
51 {
52  return tag_.empty() && !showTime_ && !showStream_ && !showLevel_ && !showArea_;
53 }
54 
55 //-/////////////////////////////////////////////////////////////////////////////////////////////////
56 #undef prefix_
57 
58 
59 // Local Variables:
60 // mode: c++
61 // fill-column: 100
62 // comment-column: 40
63 // c-file-style: "senf"
64 // indent-tabs-mode: nil
65 // ispell-local-dictionary: "american"
66 // compile-command: "scons -u test"
67 // End: