LCOV - code coverage report
Current view: top level - snaplogger - map_diagnostic.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 10 10 100.0 %
Date: 2021-08-20 16:41:45 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // Copyright (c) 2013-2021  Made to Order Software Corp.  All Rights Reserved
       2             : //
       3             : // https://snapwebsites.org/project/snaplogger
       4             : // contact@m2osw.com
       5             : //
       6             : // This program is free software; you can redistribute it and/or modify
       7             : // it under the terms of the GNU General Public License as published by
       8             : // the Free Software Foundation; either version 2 of the License, or
       9             : // (at your option) any later version.
      10             : //
      11             : // This program is distributed in the hope that it will be useful,
      12             : // but WITHOUT ANY WARRANTY; without even the implied warranty of
      13             : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      14             : // GNU General Public License for more details.
      15             : //
      16             : // You should have received a copy of the GNU General Public License along
      17             : // with this program; if not, write to the Free Software Foundation, Inc.,
      18             : // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
      19             : 
      20             : /** \file
      21             :  * \brief Appenders are used to append data to somewhere.
      22             :  *
      23             :  * This file declares the base appender class.
      24             :  */
      25             : 
      26             : 
      27             : // self
      28             : //
      29             : #include    "snaplogger/map_diagnostic.h"
      30             : 
      31             : #include    "snaplogger/private_logger.h"
      32             : 
      33             : 
      34             : // last include
      35             : //
      36             : #include    <snapdev/poison.h>
      37             : 
      38             : 
      39             : 
      40             : namespace snaplogger
      41             : {
      42             : 
      43             : 
      44             : 
      45          28 : void set_diagnostic(std::string const & key, std::string const & diagnostic)
      46             : {
      47          28 :     get_private_logger()->set_diagnostic(key, diagnostic);
      48          28 : }
      49             : 
      50             : 
      51           1 : void unset_diagnostic(std::string const & key)
      52             : {
      53           1 :     get_private_logger()->unset_diagnostic(key);
      54           1 : }
      55             : 
      56             : 
      57           2 : map_diagnostics_t get_map_diagnostics()
      58             : {
      59           2 :     return get_private_logger()->get_map_diagnostics();
      60             : }
      61             : 
      62             : 
      63          44 : map_diagnostics_t get_map_diagnostics(message const & msg)
      64             : {
      65          44 :     return get_private_logger(msg)->get_map_diagnostics();
      66             : }
      67             : 
      68             : 
      69             : 
      70             : } // snaplogger namespace
      71             : // vim: ts=4 sw=4 et

Generated by: LCOV version 1.13