aboutsummaryrefslogtreecommitdiff
path: root/src/multilog.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/multilog.cpp40
1 files changed, 2 insertions, 38 deletions
diff --git a/src/multilog.cpp b/src/multilog.cpp
index 64ff967..3dfb8b6 100644
--- a/src/multilog.cpp
+++ b/src/multilog.cpp
@@ -1,20 +1,3 @@
1/***************************************************************************
2 multilog.cpp - description
3 -------------------
4 begin : Sat Sep 6 2003
5 copyright : (C) 2003 by Mike Buland
6 email : eichlan@yf-soft.com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#include "multilog.h" 1#include "multilog.h"
19#include <stdio.h> 2#include <stdio.h>
20#include <time.h> 3#include <time.h>
@@ -23,28 +6,9 @@
23 6
24#include "multilogchannel.h" 7#include "multilogchannel.h"
25 8
26// This section is what we need to make this a singleton 9void testlog( const char *text )
27// this makes this class easy to use from anywhere, without
28// worrying about re-creating every output form and all of that crazy jazz
29MultiLog *MultiLog::singleLog = NULL;
30
31MultiLog *MultiLog::getLog()
32{
33 if( singleLog == NULL )
34 {
35 singleLog = new MultiLog;
36 atexit( cleanup );
37 }
38 return singleLog;
39}
40
41void MultiLog::cleanup()
42{ 10{
43 if( singleLog != NULL ) 11 MultiLineLog( 4, text );
44 {
45 delete singleLog;
46 singleLog = NULL;
47 }
48} 12}
49 13
50MultiLog::MultiLog() 14MultiLog::MultiLog()