OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
Stream.hpp
Go to the documentation of this file.
1 
2 
3 #ifndef FOCS_LOG_STREAM
4 #define FOCS_LOG_STREAM
5 
6 #include "focs/Log.hpp"
7 
8 #include <iostream>
9 #include <ostream>
10 #include <string>
11 #include <vector>
12 
13 namespace focs {
19 class FileStreamLogger : public LogFacility {
20  public:
22  FileStreamLogger() = default;
27  explicit FileStreamLogger(std::ostream& stream) : stream_{stream} {}
28  ~FileStreamLogger() override;
29 
30  void log(int severity, const std::string& s) override;
31  private:
32  std::ostream& stream_{std::cout};
33 };
34 }
35 
36 #endif // FOCS_LOG_STREAM
37 
FileStreamLogger()=default
Default constructor, print to std::cout.
@ string
~FileStreamLogger() override
void log(int severity, const std::string &s) override
Print a message to this log facility, with a given severity.
Base class to create new loggers.
Definition: Base.hpp:68
FileStreamLogger(std::ostream &stream)
Print to a given std::ostream.
Definition: Stream.hpp:27
Log facility for printing to a std::ostream.
Definition: Stream.hpp:19
data_t s[NROOTS]
Definition: decode_rs.h:75