PetaVision  Alpha
PV::Log< C, LT, T > Struct Template Reference

Public Types

typedef std::basic_ostream< C, T > basic_ostream
 
typedef LogStreamTraits< C, LT, T > LogStreamType
 
typedef LT LogType
 

Public Member Functions

 Log (const char *file=__FILE__, int line=__LINE__)
 
 Log (basic_ostream &s, const char *file=__FILE__, int line=__LINE__)
 
Logflush ()
 
template<typename V >
Logoperator<< (V const &value)
 
Logoperator<< (typename LogStreamType::StrFunc func)
 
void outputPrefix (const char *file, int line)
 
int printf (char const *fmt,...)
 

Private Attributes

std::basic_ostream< C, T > & _stream
 

Detailed Description

template<typename C, typename LT, typename T = std::char_traits<C>>
struct PV::Log< C, LT, T >

Definition at line 332 of file PVLog.hpp.

Member Function Documentation

template<typename C , typename LT , typename T = std::char_traits<C>>
int PV::Log< C, LT, T >::printf ( char const *  fmt,
  ... 
)
inline

A method intended to make it easy to convert printf(format,...) and fprintf(stderr,format,...) statements to versions that use the PVLog facilities. To have output recorded in the logfile, replace printf(format,...) with InfoLog().printf(format,...) and fprintf(stderr,format,...) with XXXX().printf(format,...), with XXXX replaced by WarnLog, Fatal, or ErrorLog depending on the desired behavior.

Definition at line 398 of file PVLog.hpp.


The documentation for this struct was generated from the following file: