LLGL 0.05 Beta
Loading...
Searching...
No Matches
Log.h File Reference
#include <LLGL/Export.h>
#include <LLGL/Report.h>
#include <functional>

Classes

struct  LLGL::Log::StdOutFlags
 Standard output flags enumeration. More...
struct  LLGL::Log::ColorFlags
 Enumeration of all log color code flags. More...
struct  LLGL::Log::ColorCodes
 Log color code structure. More...

Namespaces

namespace  LLGL
namespace  LLGL::Log

Macros

#define LLGL_LOG_RGB(R, G, B)
 Encodes the flags for full RGB console colors.

Typedefs

using LLGL::Log::LogHandle = void*
 Opaque handle to a log callback.
using LLGL::Log::ReportCallback = std::function<void(ReportType type, const char* text, void* userData)>
 Report callback function signature.
using LLGL::Log::ReportCallbackExt = std::function<void(ReportType type, const char* text, void* userData, const ColorCodes& colors)>

Enumerations

enum class  LLGL::Log::ReportType { LLGL::Log::Default = 0 , LLGL::Log::Error }
 Report type enumeration. More...

Functions

LLGL_EXPORT void LLGL::Log::Printf (const char *format,...)
 Prints a formatted message to the log.
LLGL_EXPORT void LLGL::Log::Printf (const ColorCodes &colors, const char *format,...)
 Prints a formatted message to the log with color codes.
LLGL_EXPORT void LLGL::Log::Errorf (const char *format,...)
 Prints a formatted error message to the log.
LLGL_EXPORT void LLGL::Log::Errorf (const ColorCodes &colors, const char *format,...)
 Prints a formatted error message to the log with color codes.
LLGL_EXPORT LogHandle LLGL::Log::RegisterCallback (const ReportCallback &callback, void *userData=nullptr)
 Registers a new log callback. No log callback is specified by default, in which case the reports are ignored.
LLGL_EXPORT LogHandle LLGL::Log::RegisterCallback (const ReportCallbackExt &callback, void *userData=nullptr)
LLGL_EXPORT LogHandle LLGL::Log::RegisterCallbackReport (Report &report)
 Registers a new log callback that is forwarded to the specified Report.
LLGL_EXPORT LogHandle LLGL::Log::RegisterCallbackStd (long stdOutFlags=0)
 Registers a new log callback to the standard output streams, i.e. stdout and stderr from <stdio.h>.
LLGL_EXPORT void LLGL::Log::UnregisterCallback (LogHandle handle)
 Unregisters the specified handle from the log output.

Macro Definition Documentation

◆ LLGL_LOG_RGB

#define LLGL_LOG_RGB ( R,
G,
B )
Value:
( \
(((R) & 0xFF) << 24) | \
(((G) & 0xFF) << 16) | \
(((B) & 0xFF) << 8) \
)
@ FullRGB
Uses fully RGB encoded color.
Definition Log.h:109

Encodes the flags for full RGB console colors.