appkit  1.5.1
RoadNarrows Robotics Application Kit
LogStream.h File Reference

Logging facitlities built on librnr log.h macros to support C++ output insertion streaming. More...

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <string>
#include "rnr/rnrconfig.h"
#include "rnr/log.h"

Go to the source code of this file.

Macros

#define LOGUSER_STREAM(level, args)
 User diagnostic stream logging. More...
 
#define LOGDIAG5_STREAM(args)
 Diagnostic level 5 stream logging. More...
 
#define LOGDIAG4_STREAM(args)
 Diagnostic level 4 stream logging. More...
 
#define LOGDIAG3_STREAM(args)
 Diagnostic level 3 stream logging. More...
 
#define LOGDIAG2_STREAM(args)
 Diagnostic level 2 stream logging. More...
 
#define LOGDIAG1_STREAM(args)
 Diagnostic level 1 stream logging. More...
 
#define LOGWARN_STREAM(args)
 Warning stream logging. More...
 
#define LOGERROR_STREAM(args)
 Error stream logging. More...
 
#define LOGSYSERROR_STREAM(args)
 System Error stream logging. More...
 

Detailed Description

Logging facitlities built on librnr log.h macros to support C++ output insertion streaming.

Author
Robin Knight (robin.nosp@m..kni.nosp@m.ght@r.nosp@m.oadn.nosp@m.arrow.nosp@m.s.co.nosp@m.m)
Copyright
© 2017. RoadNarrows LLC.
http://www.roadnarrows.com
All Rights Reserved
License:
MIT

Definition in file LogStream.h.

Macro Definition Documentation

#define LOGDIAG1_STREAM (   args)
Value:
do \
{ \
stringstream ss; \
ss << args; \
LOGDIAG1("%s", ss.str().c_str()); \
} \
while(0)

Diagnostic level 1 stream logging.

Parameters
argsStream arguments arg [<< arg [<< ...]].

Definition at line 141 of file LogStream.h.

#define LOGDIAG2_STREAM (   args)
Value:
do \
{ \
stringstream ss; \
ss << args; \
LOGDIAG2("%s", ss.str().c_str()); \
} \
while(0)

Diagnostic level 2 stream logging.

Parameters
argsStream arguments arg [<< arg [<< ...]].

Definition at line 128 of file LogStream.h.

Referenced by rnr::cmd::CommandLine::parseSyntax().

#define LOGDIAG3_STREAM (   args)
Value:
do \
{ \
stringstream ss; \
ss << args; \
LOGDIAG3("%s", ss.str().c_str()); \
} \
while(0)

Diagnostic level 3 stream logging.

Parameters
argsStream arguments arg [<< arg [<< ...]].

Definition at line 115 of file LogStream.h.

Referenced by rnr::cmd::CommandLine::readCommand().

#define LOGDIAG4_STREAM (   args)
Value:
do \
{ \
stringstream ss; \
ss << args; \
LOGDIAG4("%s", ss.str().c_str()); \
} \
while(0)

Diagnostic level 4 stream logging.

Parameters
argsStream arguments arg [<< arg [<< ...]].

Definition at line 102 of file LogStream.h.

#define LOGDIAG5_STREAM (   args)
Value:
do \
{ \
stringstream ss; \
ss << args; \
LOGDIAG5("%s", ss.str().c_str()); \
} \
while(0)

Diagnostic level 5 stream logging.

Parameters
argsStream arguments arg [<< arg [<< ...]].

Definition at line 89 of file LogStream.h.

#define LOGSYSERROR_STREAM (   args)
Value:
do \
{ \
stringstream ss; \
ss << args; \
LOGSYSERROR("%s", ss.str().c_str()); \
} \
while(0)

System Error stream logging.

Parameters
argsStream arguments arg [<< arg [<< ...]].

Definition at line 180 of file LogStream.h.

#define LOGUSER_STREAM (   level,
  args 
)
Value:
do \
{ \
stringstream ss; \
ss << args; \
LOGUSER(level, "%s", ss.str().c_str()); \
} \
while(0)

User diagnostic stream logging.

Parameters
levelLogging user level.
argsStream arguments arg [<< arg [<< ...]].

Definition at line 76 of file LogStream.h.

#define LOGWARN_STREAM (   args)
Value:
do \
{ \
stringstream ss; \
ss << args; \
LOGWARN("%s", ss.str().c_str()); \
} \
while(0)

Warning stream logging.

Parameters
argsStream arguments arg [<< arg [<< ...]].

Definition at line 154 of file LogStream.h.