#include <cinttypes>
#include <cstdlib>
#include <string>
#include "include/LogCabin/Debug.h"
Go to the source code of this file.
Namespaces |
namespace | LogCabin |
namespace | LogCabin::Core |
namespace | LogCabin::Core::StringUtil |
namespace | LogCabin::Core::Debug |
Defines |
#define | LOG(level, _format,...) |
| Unconditionally log the given message to stderr.
|
#define | PANIC(format,...) |
| Log an ERROR message and abort the process.
|
#define | EXIT(format,...) |
| Log an ERROR message and exit the process with status 1.
|
#define | ERROR(format,...) |
| Log an ERROR message.
|
#define | WARNING(format,...) |
| Log a WARNING message.
|
#define | NOTICE(format,...) |
| Log a NOTICE message.
|
#define | VERBOSE(format,...) |
| Log a VERBOSE message.
|
Functions |
std::string | LogCabin::Core::StringUtil::format (const char *format,...))) |
| A safe version of sprintf.
|
std::ostream & | LogCabin::Core::Debug::operator<< (std::ostream &ostream, LogLevel level) |
| Output a LogLevel to a stream.
|
bool | LogCabin::Core::Debug::isLogging (LogLevel level, const char *fileName) |
| Return whether the current logging configuration includes messages of the given level for the given filename.
|
void | LogCabin::Core::Debug::log (LogLevel level, const char *fileName, uint32_t lineNum, const char *functionName, const char *message) |
| Unconditionally log the given message to stderr.
|
Define Documentation
#define LOG |
( |
|
level, |
|
|
|
_format, |
|
|
|
... |
|
) |
| |
Unconditionally log the given message to stderr.
This is normally called by ERROR(), WARNING(), NOTICE(), or VERBOSE().
- Parameters:
-
level | The level of importance of the message. |
_format | A printf-style format string for the message. It should not include a line break at the end, as LOG will add one. |
... | The arguments to the format string, as in printf. |
Definition at line 101 of file Debug.h.
#define PANIC |
( |
|
format, |
|
|
|
... |
|
) |
| |
Log an ERROR message and abort the process.
- Parameters:
-
format | A printf-style format string for the message. It should not include a line break at the end, as LOG will add one. |
... | The arguments to the format string, as in printf. |
Definition at line 114 of file Debug.h.
#define EXIT |
( |
|
format, |
|
|
|
... |
|
) |
| |
Log an ERROR message and exit the process with status 1.
- Parameters:
-
format | A printf-style format string for the message. It should not include a line break at the end, as LOG will add one. |
... | The arguments to the format string, as in printf. |
Definition at line 123 of file Debug.h.
#define ERROR |
( |
|
format, |
|
|
|
... |
|
) |
| |
Log an ERROR message.
- Parameters:
-
format | A printf-style format string for the message. It should not include a line break at the end, as LOG will add one. |
... | The arguments to the format string, as in printf. |
Definition at line 136 of file Debug.h.
Log a WARNING message.
- Parameters:
-
format | A printf-style format string for the message. It should not include a line break at the end, as LOG will add one. |
... | The arguments to the format string, as in printf. |
Definition at line 143 of file Debug.h.
#define NOTICE |
( |
|
format, |
|
|
|
... |
|
) |
| |
Log a NOTICE message.
- Parameters:
-
format | A printf-style format string for the message. It should not include a line break at the end, as LOG will add one. |
... | The arguments to the format string, as in printf. |
Definition at line 150 of file Debug.h.
Log a VERBOSE message.
- Parameters:
-
format | A printf-style format string for the message. It should not include a line break at the end, as LOG will add one. |
... | The arguments to the format string, as in printf. |
Definition at line 157 of file Debug.h.