Geogram  Version 1.9.1
A programming library of geometric algorithms
logger.h File Reference

Generic logging mechanism. More...

#include <geogram/basic/common.h>
#include <geogram/basic/environment.h>
#include <geogram/basic/process.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <set>
#include <stdlib.h>

Go to the source code of this file.

Classes

class  GEO::LoggerStreamBuf
 Stream buffer used by the LoggerStreams. More...
 
class  GEO::LoggerStream
 Stream used by the Logger. More...
 
class  GEO::LoggerClient
 Logger client base class. More...
 
class  GEO::ConsoleLogger
 Logger client that redirects messages to standard output. More...
 
class  GEO::FileLogger
 Logger client that redirects messages to a file. More...
 
class  GEO::Logger
 Generic logging framework. More...
 

Namespaces

 GEO
 Global Vorpaline namespace.
 

Typedefs

typedef SmartPointer< LoggerClient > GEO::LoggerClient_var
 

Functions

int geogram_printf (const char *format,...)
 Printf-like wrapper to the Logger. More...
 
int geogram_fprintf (FILE *out, const char *format,...)
 Fprintf-like wrapper to the Logger. More...
 

Detailed Description

Generic logging mechanism.

Definition in file logger.h.

Function Documentation

◆ geogram_fprintf()

int geogram_fprintf ( FILE *  out,
const char *  format,
  ... 
)

Fprintf-like wrapper to the Logger.

By #defining fprintf to geogram_fprintf, legacy code can send fprintf formatted messages directly to the Logger:

  • formatted text printed to stdout is sent to Logger::out()
  • formatted text printed to stderr is sent to Logger::err()
  • otherwise the formatted text is printed to out using the system fprintf.
    Parameters
    [in]outoutput file
    [in]formatprintf-like format string
    See also
    fprintf

◆ geogram_printf()

int geogram_printf ( const char *  format,
  ... 
)

Printf-like wrapper to the Logger.

By #defining printf to geogram_printf, legacy code can send printf formatted messages directly to Logger::out().

Parameters
[in]formatprintf-like format string
See also
printf