c91d97713a6118db54b84fd049c75c4348e663c5
[feisty_meow.git] / nucleus / library / loggers / program_wide_logger.cpp
1 /*****************************************************************************\
2 *                                                                             *
3 *  Name   : program_wide_logger                                               *
4 *  Author : Chris Koeritz                                                     *
5 *                                                                             *
6 *******************************************************************************
7 * Copyright (c) 1994-$now By Author.  This program is free software; you can  *
8 * redistribute it and/or modify it under the terms of the GNU General Public  *
9 * License as published by the Free Software Foundation; either version 2 of   *
10 * the License or (at your option) any later version.  This is online at:      *
11 *     http://www.fsf.org/copyleft/gpl.html                                    *
12 * Please send any updates to: fred@gruntose.com                               *
13 \*****************************************************************************/
14
15 #include "program_wide_logger.h"
16
17 using namespace basis;
18 using namespace loggers;
19
20 namespace loggers {
21
22 standard_log_base *program_wide_logger::c_the_wide_log = new null_logger;
23
24 standard_log_base &program_wide_logger::get() { return *c_the_wide_log; }
25
26 standard_log_base *program_wide_logger::set(standard_log_base *new_log)
27 {
28   if (!new_log) return NIL;  // can't fool me that easily.
29   standard_log_base *old_log = c_the_wide_log;
30   c_the_wide_log = new_log;
31   return old_log;
32 }
33
34 } //namespace.
35