feisty meow concerns codebase  2.140
program_wide_logger.h
Go to the documentation of this file.
1 #ifndef PROGRAM_WIDE_LOGGER_FACILITY
2 #define PROGRAM_WIDE_LOGGER_FACILITY
3 
4 /*****************************************************************************\
5 * *
6 * Name : program_wide_logger facility *
7 * Author : Chris Koeritz *
8 * *
9 *******************************************************************************
10 * Copyright (c) 1992-$now By Author. This program is free software; you can *
11 * redistribute it and/or modify it under the terms of the GNU General Public *
12 * License as published by the Free Software Foundation; either version 2 of *
13 * the License or (at your option) any later version. This is online at: *
14 * http://www.fsf.org/copyleft/gpl.html *
15 * Please send any updates to: fred@gruntose.com *
16 \*****************************************************************************/
17 
18 #include "logging_macros.h"
19  // it seems reasonable to provide the logging macros to any file that is also using
20  // the program-wide logger.
21 
22 #include <basis/contracts.h>
23 #include <basis/definitions.h>
25 
26 namespace loggers {
27 
29 
40 {
41 public:
44 
50 
56 private:
57  static loggers::standard_log_base *c_the_wide_log;
58 };
59 
61 
63 
70 class null_logger : public virtual standard_log_base
71 {
72 public:
73  virtual ~null_logger() {}
74  DEFINE_CLASS_NAME("null_logger");
75  virtual basis::outcome log(const basis::base_string &formal(info), int formal(filter)) {
76  /* if (filter || !(&info)) {} */
77  return basis::common::OKAY;
78  }
79 };
80 
81 } //namespace.
82 
83 #endif // outer guard.
84 
Defines the base class for all string processing objects in hoople.
Definition: base_string.h:28
Outcomes describe the state of completion for an operation.
Definition: outcome.h:31
a trash can for logging; throws away all entries.
DEFINE_CLASS_NAME("null_logger")
virtual basis::outcome log(const basis::base_string &formal(info), int formal(filter))
A class that provides logging facilities vertically to all of hoople.
static loggers::standard_log_base & get()
Provided by the startup code within each application for logging.
static loggers::standard_log_base * set(loggers::standard_log_base *new_log)
replaces the current program-wide logger with the "new_log".
A base class for a very usable logger with a filter_set and eol awareness.
Constants and objects used throughout HOOPLE.
#define formal(parameter)
This macro just eats what it's passed; it marks unused formal parameters.
Definition: definitions.h:48
A logger that sends to the console screen using the standard output device.