4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Stefan Bund <g0dil@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief StatisticsTargets public header */
26 #ifndef HH_SENF_PPI_Utils_StatisticsTargets_
27 #define HH_SENF_PPI_Utils_StatisticsTargets_ 1
31 #include "Logger/Logger.hh"
33 //#include "StatisticsTargets.mpp"
34 #include "StatisticsTargets.ih"
35 ///////////////////////////////hh.p////////////////////////////////////////
40 /** \brief Logging stream for statistics messages
41 \ingroup senf_statistics
43 typedef unspecified StatisticsStream;
45 SENF_LOG_DEFINE_STREAM(StatisticsStream,
46 senf::log::MESSAGE, senf::log::MESSAGE, senf::log::MESSAGE);
51 /** \brief Send statistics to SENF log
53 This statistics target will send all statistics values to the SENF log. The template
54 parameters optionally specify the stream, area and/or level to send the messages to. An
55 optional \a label string may be specified which will be added as prefix to all log entries.
57 The log stream defaults to senf::StatisticsStream, the level defaults to
58 senf::log::MESSAGE and the are defaults to senf::log::DefaultArea.
61 // Connect with default parameters
62 stats.output(2u).connect()
64 // Send statistics messages to the debug stream at default level (MESSAGE)
65 // Place them in the MyStatistics area. Add 'stat1' prefix to each log message
66 SENF_LOG_DEF_AREA(MyStatistics);
67 stats.output(2u).connect<senf::log::Debug, MyStatistics>("stat1");
70 \ingroup senf_statistics
72 template <class A1=void, class A2=void, class A3=void>
73 std::auto_ptr< unspecified > StatisticsLogger(std::string const & label="")
77 std::auto_ptr< detail::StatisticsLogger<void,void,void> > StatisticsLogger(
78 std::string const & label="");
80 template <class Stream>
81 std::auto_ptr< detail::StatisticsLogger<Stream,void,void> > StatisticsLogger(
82 std::string const & label="");
84 template <class Stream, class Area>
85 std::auto_ptr< detail::StatisticsLogger<Stream,Area,void> > StatisticsLogger(
86 std::string const & label="");
88 template <class Stream, class Area, class Level>
89 std::auto_ptr< detail::StatisticsLogger<Stream,Area,Level> > StatisticsLogger(
90 std::string const & label="");
96 ///////////////////////////////hh.e////////////////////////////////////////
97 #include "StatisticsTargets.cci"
98 #include "StatisticsTargets.ct"
99 #include "StatisticsTargets.cti"
106 // comment-column: 40
107 // c-file-style: "senf"
108 // indent-tabs-mode: nil
109 // ispell-local-dictionary: "american"
110 // compile-command: "scons -u test"