OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022

#include <File.hpp>

Inheritance diagram for FileLogger:
[legend]
Collaboration diagram for FileLogger:
[legend]

Public Member Functions

 FileLogger (const std::string &filename, std::ios_base::openmode mode=std::ios_base::out)
 
 ~FileLogger () override
 
void log (int severity, const std::string &s) override
 
- Public Member Functions inherited from LogFacility
virtual ~LogFacility ()
 
virtual void log (LogSeverity severity, const std::string &s)
 

Detailed Description

Log facility for printing to a file.

Definition at line 17 of file File.hpp.

Constructor & Destructor Documentation

◆ FileLogger()

FileLogger ( const std::string filename,
std::ios_base::openmode  mode = std::ios_base::out 
)
inline

Open a file at the given path, optionally with a specific file mode.

Parameters
filenamePath to log file
modeMode with which to open the file

Definition at line 25 of file File.hpp.

◆ ~FileLogger()

~FileLogger ( )
override

Clean-up destructor to flush and close file handle.

Member Function Documentation

◆ log()

void log ( int  severity,
const std::string s 
)
overridevirtual

Print a message to this log facility, with a given severity.

Parameters
severitynumeric severity level
smessage to log

Implements LogFacility.


The documentation for this class was generated from the following file:
  • /gfs-oceanweb/web/ocssw/ocssw_src/include/focs/log/File.hpp