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: 2019-12-13 00:59:36 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.13