Classes | Namespaces | Macros | Enumerations
logstream.hpp File Reference

Detailed Description

Writing to a log stream made easy, typesafe, threadsafe and portable. Inspired by Petru Marginean, "Logging in C++," Dr.Dobbs, October 2007.

Definition in file logstream.hpp.

#include <cstdio>
#include <sstream>
#include <string>
#include <iostream>
#include "gnsstk_export.h"
#include <sys/time.h>
Include dependency graph for logstream.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gnsstk::ConfigureLOG
 class ConfigureLOG - inherits class Log with type ConfigureLOGstream More...
 
class  gnsstk::ConfigureLOGstream
 
class  gnsstk::Log< T >
 

Namespaces

 gnsstk
 For Sinex::InputHistory.
 

Macros

#define FILELOG_MAX_LEVEL   DEBUG7
 Define the maximum log level. More...
 
#define LOG(level)
 define the macro that is used to write to the log stream More...
 
#define LOGlevel   ConfigureLOG::ReportingLevel()
 
#define LOGstrm   *(ConfigureLOGstream::Stream())
 
#define pLOGstrm   ConfigureLOGstream::Stream()
 

Enumerations

enum  gnsstk::LogLevel {
  gnsstk::ERROR, gnsstk::WARNING, gnsstk::INFO, gnsstk::VERBOSE,
  gnsstk::DEBUG, gnsstk::DEBUG1, gnsstk::DEBUG2, gnsstk::DEBUG3,
  gnsstk::DEBUG4, gnsstk::DEBUG5, gnsstk::DEBUG6, gnsstk::DEBUG7
}
 

Macro Definition Documentation

◆ FILELOG_MAX_LEVEL

#define FILELOG_MAX_LEVEL   DEBUG7

Define the maximum log level.

Definition at line 61 of file logstream.hpp.

◆ LOG

#define LOG (   level)
Value:
if(level <= FILELOG_MAX_LEVEL && \
level <= ConfigureLOG::ReportingLevel() && \
ConfigureLOGstream::Stream()) ConfigureLOG().Put(level)

define the macro that is used to write to the log stream

Definition at line 315 of file logstream.hpp.

◆ LOGlevel

#define LOGlevel   ConfigureLOG::ReportingLevel()

Definition at line 323 of file logstream.hpp.

◆ LOGstrm

#define LOGstrm   *(ConfigureLOGstream::Stream())

Definition at line 322 of file logstream.hpp.

◆ pLOGstrm

#define pLOGstrm   ConfigureLOGstream::Stream()

Definition at line 321 of file logstream.hpp.

FILELOG_MAX_LEVEL
#define FILELOG_MAX_LEVEL
Define the maximum log level.
Definition: logstream.hpp:61


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:43