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
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
15 \brief AreaRegistry internal header */
17 #ifndef IH_SENF_Utils_Logger_AreaRegistry_
18 #define IH_SENF_Utils_Logger_AreaRegistry_ 1
25 #include "TimeSource.hh"
27 //-/////////////////////////////////////////////////////////////////////////////////////////////////
38 /** \brief Internal: Area base class */
44 std::string fullName() const;
45 virtual std::string v_name() const;
50 unsigned limit(StreamBase const & stream) const;
51 void updateRoutingCache(Target & target, StreamBase const & stream, unsigned limit) const;
52 void removeRoutingCache(Target & target, StreamBase const & stream) const;
53 void write(time_type timestamp, StreamBase const & stream, unsigned level,
54 std::string const & msg) const;
58 RouteEntry(unsigned limit_, Target * target_) : limit(limit_), target(target_) {}
62 typedef std::list<RouteEntry> Routes;
64 CacheEntry() : limit (DISABLED::value), routes() {}
68 typedef std::vector<CacheEntry> RoutingCache;
69 mutable RoutingCache routingCache_;
76 //-/////////////////////////////////////////////////////////////////////////////////////////////////
84 // c-file-style: "senf"
85 // indent-tabs-mode: nil
86 // ispell-local-dictionary: "american"
87 // compile-command: "scons -u test"