Isis Developer Reference
SessionLog.h
Go to the documentation of this file.
1#ifndef SessionLog_h
2#define SessionLog_h
8/* SPDX-License-Identifier: CC0-1.0 */
9#include <string>
10#include "Pvl.h"
11#include "IException.h"
12
13namespace Isis {
24 class SessionLog : private Isis::Pvl {
25 public:
26 static SessionLog &TheLog(bool restart = false);
27 static bool HasLog() {
28 return p_log != NULL;
29 };
30
31 // Add the Results group
32 void AddResults(Isis::PvlGroup &results);
33
34 // Write the log to the screen and/or file
35 void Write();
36
37 // Add an Error to the log
38 void AddError(Isis::Pvl &e);
39
40 // Will we be logging to the terminal?
42 return p_termOutput;
43 };
44
45 private:
46 SessionLog();
48
49 PvlObject *p_root;
50 bool p_errorAdded;
51
52 bool p_termOutput;
53 bool p_fileOutput;
54 QString p_outputFile;
55 QString p_access;
56
57 static SessionLog *p_log;
58
59 bool p_acctAdded;
60 void AddAccounting();
61 friend std::ostream &operator<<(std::ostream &os, Isis::SessionLog &log);
62 static void Shutdown();
63 };
64};
65
66#endif
Contains multiple PvlContainers.
Definition PvlGroup.h:41
Container for cube-like labels.
Definition Pvl.h:119
Contains Pvl Groups and Pvl Objects.
Definition PvlObject.h:61
Definition SessionLog.h:24
static SessionLog & TheLog(bool restart=false)
Definition SessionLog.cpp:39
friend std::ostream & operator<<(std::ostream &os, Isis::SessionLog &log)
Definition SessionLog.cpp:101
void AddError(Isis::Pvl &e)
Definition SessionLog.cpp:87
bool TerminalOutput()
Definition SessionLog.h:41
void AddResults(Isis::PvlGroup &results)
Definition SessionLog.cpp:97
static bool HasLog()
Definition SessionLog.h:27
void Write()
Definition SessionLog.cpp:53
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16