NAWA 0.9
Web Application Framework for C++
Log.h File Reference

Simple class for (not (yet) thread-safe) logging to stderr or to any other output stream. More...

#include <fstream>
#include <iostream>
#include <nawa/internal/macros.h>
#include <sstream>

Go to the source code of this file.

Classes

class  nawa::Log
 

Namespaces

namespace  nawa
 

Macros

#define NLOG(Logger, Message)
 
#define NLOG_ERROR(Logger, Message)
 
#define NLOG_WARNING(Logger, Message)
 
#define NLOG_INFO(Logger, Message)
 
#define NLOG_DEBUG(Logger, Message)
 

Detailed Description

Simple class for (not (yet) thread-safe) logging to stderr or to any other output stream.

Definition in file Log.h.

Macro Definition Documentation

◆ NLOG

#define NLOG (   Logger,
  Message 
)
Value:
{ \
std::ostringstream msgs; \
msgs << Message; \
(Logger).write(msgs.str()); \
}

Definition at line 177 of file Log.h.

◆ NLOG_ERROR

#define NLOG_ERROR (   Logger,
  Message 
)
Value:
{ \
std::ostringstream msgs; \
msgs << Message; \
(Logger).write(msgs.str(), nawa::Log::Level::ERROR); \
}

Definition at line 183 of file Log.h.

◆ NLOG_WARNING

#define NLOG_WARNING (   Logger,
  Message 
)
Value:
{ \
std::ostringstream msgs; \
msgs << Message; \
(Logger).write(msgs.str(), nawa::Log::Level::WARNING); \
}

Definition at line 189 of file Log.h.

◆ NLOG_INFO

#define NLOG_INFO (   Logger,
  Message 
)
Value:
{ \
std::ostringstream msgs; \
msgs << Message; \
(Logger).write(msgs.str(), nawa::Log::Level::INFORMATIONAL); \
}

Definition at line 195 of file Log.h.

◆ NLOG_DEBUG

#define NLOG_DEBUG (   Logger,
  Message 
)
Value:
{ \
std::ostringstream msgs; \
msgs << Message; \
(Logger).write(msgs.str(), nawa::Log::Level::DEBUG); \
}

Definition at line 201 of file Log.h.