4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
6 // The contents of this file are subject to the Fraunhofer FOKUS Public License
7 // Version 1.0 (the "License"); you may not use this file except in compliance
8 // with the License. You may obtain a copy of the License at
9 // http://senf.berlios.de/license.html
11 // The Fraunhofer FOKUS Public License Version 1.0 is based on,
12 // but modifies the Mozilla Public License Version 1.1.
13 // See the full license text for the amendments.
15 // Software distributed under the License is distributed on an "AS IS" basis,
16 // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
17 // for the specific language governing rights and limitations under the License.
19 // The Original Code is Fraunhofer FOKUS code.
21 // The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V.
22 // (registered association), Hansastraße 27 c, 80686 Munich, Germany.
23 // All Rights Reserved.
26 // Stefan Bund <g0dil@berlios.de>
29 \brief StatisticsTargets public header */
31 #ifndef HH_SENF_PPI_Utils_StatisticsTargets_
32 #define HH_SENF_PPI_Utils_StatisticsTargets_ 1
36 #include <senf/Utils/Logger/Logger.hh>
38 //#include "StatisticsTargets.mpp"
39 #include "StatisticsTargets.ih"
40 //-/////////////////////////////////////////////////////////////////////////////////////////////////
45 /** \brief Logging stream for statistics messages
46 \ingroup senf_statistics
48 typedef unspecified StatisticsStream;
50 SENF_LOG_DEFINE_STREAM(StatisticsStream,
51 senf::log::MESSAGE, senf::log::MESSAGE, senf::log::MESSAGE);
56 /** \brief Send statistics to SENF log
58 This statistics target will send all statistics values to the SENF log. The template
59 parameters optionally specify the stream, area and/or level to send the messages to. An
60 optional \a label string may be specified which will be added as prefix to all log entries.
62 The log stream defaults to senf::StatisticsStream, the level defaults to
63 senf::log::MESSAGE and the area defaults to senf::log::DefaultArea.
66 // Connect with default parameters
67 stats.output(2u).connect()
69 // Send statistics messages to the debug stream at default level (MESSAGE)
70 // Place them in the MyStatistics area. Add 'stat1' prefix to each log message
71 SENF_LOG_DEF_AREA(MyStatistics);
72 stats.output(2u).connect<senf::log::Debug, MyStatistics>("stat1");
75 \ingroup senf_statistics
77 template <class A1=void, class A2=void, class A3=void>
78 std::auto_ptr< unspecified > StatisticsLogger(std::string const & label="")
82 std::auto_ptr< detail::StatisticsLogger<void,void,void> > StatisticsLogger(
83 std::string const & label="");
85 template <class Stream>
86 std::auto_ptr< detail::StatisticsLogger<Stream,void,void> > StatisticsLogger(
87 std::string const & label="");
89 template <class Stream, class Area>
90 std::auto_ptr< detail::StatisticsLogger<Stream,Area,void> > StatisticsLogger(
91 std::string const & label="");
93 template <class Stream, class Area, class Level>
94 std::auto_ptr< detail::StatisticsLogger<Stream,Area,Level> > StatisticsLogger(
95 std::string const & label="");
101 //-/////////////////////////////////////////////////////////////////////////////////////////////////
102 #include "StatisticsTargets.cci"
103 #include "StatisticsTargets.ct"
104 #include "StatisticsTargets.cti"
111 // comment-column: 40
112 // c-file-style: "senf"
113 // indent-tabs-mode: nil
114 // ispell-local-dictionary: "american"
115 // compile-command: "scons -u test"