ReFRACtor
FullPhysics::FpLogger Class Reference

This is the implementation of the Logger used for the Full Physics program. More...

#include <fp_logger.h>

+ Inheritance diagram for FullPhysics::FpLogger:
+ Collaboration diagram for FullPhysics::FpLogger:

Public Types

enum  log_level {
  DEBUG = 4, INFO =3, WARNING =2, ERROR =1,
  FATAL =0
}
 

Public Member Functions

 FpLogger (int Verbosity_level=LogImp::DEBUG)
 Constructor. More...
 
virtual ~FpLogger ()
 
virtual void flush (log_level l)
 Flush data to log. More...
 
void print (std::ostream &Os)
 
std::string print_to_string () const
 Print to string. More...
 
virtual std::ostream * stream ()
 Underlying stream, can be null if no underlying stream. More...
 
template<class T >
void write (log_level l, const T &v)
 
void write (log_level l, const std::string &v)
 Write to a log. More...
 
void write (log_level l, const char *v)
 

Protected Attributes

std::ostringstream os
 

Detailed Description

This is the implementation of the Logger used for the Full Physics program.

This just writes to stdout or stderr, filtering by the level, and adding in a leading label (e.g., "INFO").

Definition at line 12 of file fp_logger.h.

Member Enumeration Documentation

◆ log_level

Enumerator
DEBUG 
INFO 
WARNING 
ERROR 
FATAL 

Definition at line 14 of file logger.h.

Constructor & Destructor Documentation

◆ FpLogger()

FullPhysics::FpLogger::FpLogger ( int  Verbosity_level = LogImp::DEBUG)
inline

Constructor.

Definition at line 18 of file fp_logger.h.

◆ ~FpLogger()

virtual FullPhysics::FpLogger::~FpLogger ( )
inlinevirtual

Definition at line 20 of file fp_logger.h.

Member Function Documentation

◆ flush()

void FpLogger::flush ( log_level  l)
virtual

Flush data to log.

Implements FullPhysics::LogImp.

Definition at line 19 of file fp_logger.cc.

◆ print()

void FullPhysics::LogImp::print ( std::ostream &  Os)
inlineinherited

Definition at line 33 of file logger.h.

◆ print_to_string()

std::string FullPhysics::Printable< LogImp >::print_to_string ( ) const
inlineinherited

Print to string.

This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.

Definition at line 31 of file printable.h.

◆ stream()

virtual std::ostream* FullPhysics::FpLogger::stream ( )
inlinevirtual

Underlying stream, can be null if no underlying stream.

Implements FullPhysics::LogImp.

Definition at line 22 of file fp_logger.h.

◆ write() [1/3]

template<class T >
void FullPhysics::LogImp::write ( log_level  l,
const T &  v 
)
inlineinherited

Definition at line 15 of file logger.h.

◆ write() [2/3]

void LogImp::write ( log_level  l,
const std::string &  v 
)
inherited

Write to a log.

Definition at line 45 of file logger.cc.

◆ write() [3/3]

void FullPhysics::LogImp::write ( log_level  l,
const char *  v 
)
inlineinherited

Definition at line 18 of file logger.h.

Member Data Documentation

◆ os

std::ostringstream FullPhysics::LogImp::os
protectedinherited

Definition at line 35 of file logger.h.


The documentation for this class was generated from the following files:

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:12