00001 /*****************************************************************************\ 00002 * * 00003 * Name : program_wide_logger * 00004 * Author : Chris Koeritz * 00005 * * 00006 ******************************************************************************* 00007 * Copyright (c) 1994-$now By Author. This program is free software; you can * 00008 * redistribute it and/or modify it under the terms of the GNU General Public * 00009 * License as published by the Free Software Foundation; either version 2 of * 00010 * the License or (at your option) any later version. This is online at: * 00011 * http://www.fsf.org/copyleft/gpl.html * 00012 * Please send any updates to: fred@gruntose.com * 00013 \*****************************************************************************/ 00014 00015 #include "program_wide_logger.h" 00016 00017 using namespace basis; 00018 using namespace loggers; 00019 00020 namespace loggers { 00021 00022 standard_log_base *program_wide_logger::c_the_wide_log = new null_logger; 00023 00024 standard_log_base &program_wide_logger::get() { return *c_the_wide_log; } 00025 00026 standard_log_base *program_wide_logger::set(standard_log_base *new_log) 00027 { 00028 if (!new_log) return NIL; // can't fool me that easily. 00029 standard_log_base *old_log = c_the_wide_log; 00030 c_the_wide_log = new_log; 00031 return old_log; 00032 } 00033 00034 } //namespace. 00035
1.6.3