19 #ifdef MTNLOG_NO_STDBOOL
20 #define MTNLOG_BOOL int
23 #define MTNLOG_BOOL bool
56 #define mtnlogMessageC(level, ...) mtnlogMessageCInternal(__LINE__, __FILE_NAME__, __func__, (level), __VA_ARGS__)
58 #define mtnlogMessageC(level, ...) mtnlogMessageCInternal(__LINE__, __FILE_NAME__, "", (level), __VA_ARGS__)
62 #define mtnlogMessageC(level, ...) mtnlogMessageCInternal(__LINE__, __FILE__, __func__, (level), __VA_ARGS__)
64 #define mtnlogMessageC(level, ...) mtnlogMessageCInternal(__LINE__, __FILE__, "", (level), __VA_ARGS__)
76 #define mtnlogMessageTagC(level, tag, ...) mtnlogMessageTagCInternal(__LINE__, __FILE_NAME__, __func__, (level), (tag), __VA_ARGS__)
78 #define mtnlogMessageTagC(level, tag, ...) mtnlogMessageTagCInternal(__LINE__, __FILE_NAME__, "", (level), (tag), __VA_ARGS__)
82 #define mtnlogMessageTagC(level, tag, ...) mtnlogMessageTagCInternal(__LINE__, __FILE__, __func__, (level), (tag), __VA_ARGS__)
84 #define mtnlogMessageTagC(level, tag, ...) mtnlogMessageTagCInternal(__LINE__, __FILE__, "", (level), (tag), __VA_ARGS__)
#define MTNLOG_BOOL
MtnLog boolean type.
Definition: mtnlog.h:23
void mtnlogMessageCInternal(const int line, const char *file, const char *function, const MtnLogLevel level, const char *message,...)
Internal function for mtnlogMessageC.
void(* MtnLogCallback)(MtnLogLevel, const char *, const char *)
Log callback function.
Definition: mtnlog.h:47
void mtnlogMessage(const MtnLogLevel level, const char *format,...)
Print a message to the log.
MTNLOG_BOOL mtnlogCheckColor(void)
Check if color is supported.
void mtnlogMessageTag(const MtnLogLevel level, const char *tag, const char *format,...)
Print a message to the log with a tag.
void mtnlogMessageTagCInternal(const int line, const char *file, const char *function, const MtnLogLevel level, const char *tag, const char *message,...)
Internal function for mtnlogMessageTagC.
void mtnlogSetCallback(const MtnLogCallback cb)
Set log callback.
void mtnlogVMessageTag(const MtnLogLevel level, const char *tag, const char *format, va_list l)
Print a message to the log with a tag (VA list version)
void mtnlogTimestamps(const MTNLOG_BOOL enable)
Enable or disable log timestamps.
void mtnlogConsoleOutput(const MTNLOG_BOOL enable)
Enable or disable outputting log messages into console (stdout)
void mtnlogFileOutput(const MTNLOG_BOOL enable)
Enable or disable outputting log messages into the log file.
void mtnlogColor(const MTNLOG_BOOL enable)
Enable or disable color for messages.
void mtnlogInit(const MtnLogLevel level, const char *logFileName)
Initialize logging.
void mtnlogVMessage(const MtnLogLevel level, const char *format, va_list l)
Print a message to the log (VA list version)
MtnLogLevel
Enum representing logging level.
Definition: mtnlog.h:32
@ MTNLOG_ERROR
Definition: mtnlog.h:35
@ MTNLOG_INFO
Definition: mtnlog.h:33
@ MTNLOG_WARNING
Definition: mtnlog.h:34
void mtnlogConsoleTimestamps(const MTNLOG_BOOL enable)
Enable or disable putting timestamps in console.
void mtnlogSetLevel(const MtnLogLevel level)
Set logging level.