Molassembler  3.0.1
Molecule graph and conformer library
Log.h
Go to the documentation of this file.
1 
8 #ifndef INCLUDE_MOLASSEMBLER_LOG_H
9 #define INCLUDE_MOLASSEMBLER_LOG_H
10 
11 #include "Molassembler/Export.h"
12 #include <unordered_set>
13 #include <iostream>
14 
15 namespace Scine {
16 namespace Molassembler {
17 namespace Log {
18 
19 namespace Detail {
20 class NullBuffer : public std::streambuf {
21 public:
22  int overflow(int c) override;
23 };
24 
25 // Some objects we need
26 extern NullBuffer nullBuffer;
27 extern std::ostream nullStream;
28 } // namespace Detail
29 
31 enum class MASM_EXPORT Level : unsigned {
32  Trace,
33  Debug,
34  Info,
35  Warning,
36  Error,
37  Fatal,
38  None
39 };
40 
42 enum class MASM_EXPORT Particulars {
71 };
72 
73 
75 MASM_EXPORT extern Level level;
77 MASM_EXPORT extern std::unordered_set<Particulars> particulars;
78 
85 std::ostream& log(const Level& decisionLevel);
92 std::ostream& log(const Particulars& particular);
94 bool isSet(Particulars particular);
95 
96 } // namespace Log
97 } // namespace Molassembler
98 } // namespace Scine
99 #endif
Particulars
Particular cases of special logging items that may or may not be desired.
Definition: Log.h:42
@ DgDebugInfo
in debugDistanceGeometry, progress information
@ DgFinalErrorContributions
In ConformerGeneration, explain final contributions to the error function.
@ DgStructureAcceptanceFailures
Explain why a structure was not accepted.
@ RankingTreeDebugInfo
Ranking debug information.
@ gatherDGInformationTrees
In generateConformation, show the Trees generated from the molecules.
@ DgRefinementChiralityNumericalDebugInfo
In DgRefinementProblem, chiral constraint numerical debug information.
std::ostream & log(const Level &decisionLevel)
Fetch a log handle with a logging level.
bool isSet(Particulars particular)
Checks whether a particular is part of the current library particulars.
Level
Level of logging.
Definition: Log.h:31