casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SLog.h
Go to the documentation of this file.
1 //# Log.h: this defines a singleton logger for the TablePlot classes.
2 //# Copyright (C) 2007
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //#
27 //#
28 //# -------------------------------------------------------------------------
29 
30 #ifndef SLOG_H
31 #define SLOG_H
32 
33 #include <casa/Logging/LogIO.h>
34 #include <casa/BasicSL/String.h>
35 
36 namespace casa {
37 
38 
39 class SLog : public casacore::LogIO
40 {
41 public:
42  static SLog *slog();
43  ~SLog();
44 
45  void out(const casacore::String &msg,
46  const casacore::String& fnname = "",
47  const casacore::String& clname = "",
49  casacore::Bool onconsole = false);
50  void FnEnter(casacore::String fnname, casacore::String clname);
51  void FnExit(casacore::String fnname, casacore::String clname);
52  void FnPass(casacore::String fnname, casacore::String clname);
53 
54 private:
55  static SLog* instance;
56  //static casacore::uInt refCount;
57  SLog();
58 
59 };
60 
61 };
62 #endif
63 
void out(const casacore::String &msg, const casacore::String &fnname="", const casacore::String &clname="", casacore::LogMessage::Priority msglevel=casacore::LogMessage::DEBUG1, casacore::Bool onconsole=false)
SLog()
static casacore::uInt refCount;
static SLog * instance
Definition: SLog.h:55
ostream-like interface to creating log messages.
Definition: LogIO.h:167
static SLog * slog()
void FnExit(casacore::String fnname, casacore::String clname)
void FnEnter(casacore::String fnname, casacore::String clname)
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
void FnPass(casacore::String fnname, casacore::String clname)
Priority
An &quot;importance&quot; which is assigned to each LogMessage.
Definition: LogMessage.h:105
String: the storage and methods of handling collections of characters.
Definition: String.h:223