IFEM  90A354
ScopedLogger.h
Go to the documentation of this file.
1 //==============================================================================
11 //==============================================================================
12 #ifndef SCOPED_LOGGER_H_
13 #define SCOPED_LOGGER_H_
14 
15 #include <iostream>
16 
20 class ScopedLogger {
21  public:
25  ScopedLogger(const char* name_, std::ostream& _stream=std::cout);
26 
28  ~ScopedLogger();
29  protected:
30  const char* name;
31  std::ostream& stream;
32  int rank;
33 };
34 #endif
Scoped logging class used for logging function entry/departures.
Definition: ScopedLogger.h:20
const char * name
The name of the function.
Definition: ScopedLogger.h:30
std::ostream & stream
The stream to log to.
Definition: ScopedLogger.h:31
ScopedLogger(const char *name_, std::ostream &_stream=std::cout)
Constructor.
Definition: ScopedLogger.C:17
~ScopedLogger()
Destructor.
Definition: ScopedLogger.C:29
int rank
Process rank (MPI)
Definition: ScopedLogger.h:32