LCOV - code coverage report
Current view: top level - log - logger_support.cc (source / functions) Hit Total Coverage
Test: report.info Lines: 9 9 100.0 %
Date: 2012-05-15 Functions: 4 4 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : // Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
       2                 :            : //
       3                 :            : // Permission to use, copy, modify, and/or distribute this software for any
       4                 :            : // purpose with or without fee is hereby granted, provided that the above
       5                 :            : // copyright notice and this permission notice appear in all copies.
       6                 :            : //
       7                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
       8                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
       9                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
      10                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
      11                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
      12                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
      13                 :            : // PERFORMANCE OF THIS SOFTWARE
      14                 :            : 
      15                 :            : #include <string>
      16                 :            : #include <log/logger_support.h>
      17                 :            : #include <log/logger_manager.h>
      18                 :            : 
      19                 :            : using namespace std;
      20                 :            : 
      21                 :            : namespace {
      22                 :            : 
      23                 :            : // Flag to hold logging initialization state.
      24                 :            : bool logging_init_state = false;
      25                 :            : 
      26                 :            : } // Anonymous namespace
      27                 :            : 
      28                 :            : namespace isc {
      29                 :            : namespace log {
      30                 :            : 
      31                 :            : // Return initialization state.
      32                 :            : bool
      33                 :        180 : isLoggingInitialized() {
      34                 :        180 :     return (logging_init_state);
      35                 :            : }
      36                 :            : 
      37                 :            : // Set initialization state.  (Note: as logging can be initialized via a direct
      38                 :            : // call to LoggerManager::init(), this function is called from there, not from
      39                 :            : // the initialization functions in this file.
      40                 :            : void
      41                 :        129 : setLoggingInitialized(bool state) {
      42                 :        129 :     logging_init_state = state;
      43                 :        129 : }
      44                 :            : 
      45                 :            : // Logger Run-Time Initialization.
      46                 :            : 
      47                 :            : void
      48                 :         23 : initLogger(const string& root, isc::log::Severity severity, int dbglevel,
      49                 :            :     const char* file) {
      50                 :         23 :     LoggerManager::init(root, severity, dbglevel, file);
      51                 :         23 : }
      52                 :            : 
      53                 :            : } // namespace log
      54                 :        141 : } // namespace isc

Generated by: LCOV version 1.9