18struct AtParamValueMap;
27#if !defined(__AI_FILE__)
28#define __AI_FILE__ __FILE__
30#if !defined(__AI_LINE__)
31#define __AI_LINE__ __LINE__
33#if !defined(__AI_FUNCTION__)
34#define __AI_FUNCTION__ __FUNCTION__
41#define AI_SEVERITY_INFO 0x00
42#define AI_SEVERITY_WARNING 0x01
43#define AI_SEVERITY_ERROR 0x02
44#define AI_SEVERITY_FATAL 0x03
51#define AI_LOG_NONE 0x0000
52#define AI_LOG_INFO 0x0001
53#define AI_LOG_WARNINGS 0x0002
54#define AI_LOG_ERRORS 0x0004
55#define AI_LOG_DEBUG 0x0008
56#define AI_LOG_STATS 0x0010
57#define AI_LOG_ASS_PARSE 0x0020
58#define AI_LOG_PLUGINS 0x0040
59#define AI_LOG_PROGRESS 0x0080
60#define AI_LOG_NAN 0x0100
61#define AI_LOG_TIMESTAMP 0x0200
62#define AI_LOG_BACKTRACE 0x0400
63#define AI_LOG_MEMORY 0x0800
64#define AI_LOG_COLOR 0x1000
65#define AI_LOG_STATUS 0x2000
70 ( AI_LOG_INFO | AI_LOG_WARNINGS | AI_LOG_ERRORS | \
71 AI_LOG_DEBUG | AI_LOG_STATS | AI_LOG_PLUGINS | \
72 AI_LOG_PROGRESS | AI_LOG_NAN | AI_LOG_ASS_PARSE | \
73 AI_LOG_TIMESTAMP | AI_LOG_BACKTRACE | AI_LOG_MEMORY | \
86# define AI_PRINTF_ARGS(fmtarg_pos, vararg_pos) __attribute__ ((format (printf, fmtarg_pos, vararg_pos) ))
88# define AI_PRINTF_ARGS(fmtarg_pos, vararg_pos)
101typedef void (*
AtMsgExtendedCallBack)(
int logmask,
int severity,
const char* msg_string, AtParamValueMap* metadata,
void* user_ptr);
115#ifdef AI_GPU_COMPILER
116# define AiMsgInfo(format, ...)
117# define AiMsgDebug(format, ...)
118# define AiMsgWarning(format, ...)
119# define AiMsgError(format, ...)
120# define AiMsgFatal(format, ...)
122AI_API
void AiMsgInfo(
const char* format, ...) AI_PRINTF_ARGS(1,2);
123AI_API
void AiMsgDebug(const
char* format, ...) AI_PRINTF_ARGS(1,2);
124AI_API
void AiMsgWarning(const
char* format, ...) AI_PRINTF_ARGS(1,2);
125AI_API
void AiMsgError(const
char* format, ...) AI_PRINTF_ARGS(1,2);
126AI_API
void AiMsgFatal(const
char* format, ...) AI_PRINTF_ARGS(1,2);
DLL export prefix for API functions (necessary for multi-platform development)
AI_API void AiMsgDeregisterCallback(unsigned int callback_id)
Remove a previously registered logging callback function.
Definition: ai_msg.cpp:161
AI_API void AiMsgWarning(const char *format,...)
Send a warning message to the log.
Definition: ai_msg.cpp:243
void(* AtMsgExtendedCallBack)(int logmask, int severity, const char *msg_string, AtParamValueMap *metadata, void *user_ptr)
Custom message callback, as passed to AiMsgRegisterCallback()
Definition: ai_msg.h:101
AI_API void AiMsgSystemInfo(const AtUniverse *universe)
Output system information to the log.
Definition: ai_msg.cpp:361
AI_API uint32_t AiMsgUtilGetElapsedTime()
Elapsed time since AiBegin()
Definition: ai_msg.cpp:346
AI_API void AiMsgDebug(const char *format,...)
Send a debug message to the log.
Definition: ai_msg.cpp:220
AI_API unsigned int AiMsgRegisterCallback(AtMsgExtendedCallBack func, int mask, void *user_ptr)
Add an additional logging callback function.
Definition: ai_msg.cpp:150
AI_API void AiMsgError(const char *format,...)
Send an error message to the log.
Definition: ai_msg.cpp:273
AI_API int AiMsgGetCallbackMask(unsigned int callback_id)
Returns the mask of a previously registered logging callback function.
Definition: ai_msg.cpp:186
AI_API void AiMsgSetConsoleFlags(const AtUniverse *universe, int flags)
Set the mask for what types of messages from the specified universe can be written to stdout.
Definition: ai_msg.cpp:78
AI_API void AiMsgInfo(const char *format,...)
Send an information message to the log.
Definition: ai_msg.cpp:201
AI_API void AiMsgSetCallbackMask(unsigned int callback_id, int mask)
Sets the mask of a previously registered logging callback function.
Definition: ai_msg.cpp:174
AI_API int AiMsgGetLogFileFlags(const AtUniverse *universe)
Get the type of messages that will be written to the log file for a given universe.
Definition: ai_msg.cpp:97
AI_API void AiMsgSetLogFileFlags(const AtUniverse *universe, int flags)
Set the mask for what types of messages from the specified universe can be written to the log file.
Definition: ai_msg.cpp:57
AI_API void AiMsgFatal(const char *format,...)
Send a fatal error message to the log.
Definition: ai_msg.cpp:304
AI_API void AiMsgTab(int tabinc)
Change the indentation of subsequent log messages.
Definition: ai_msg.cpp:325
AI_API void AiMsgSetMaxWarnings(int max_warnings)
Set the maximum number of reported warnings.
Definition: ai_msg.cpp:133
AI_API size_t AiMsgUtilGetUsedMemory()
Memory used by this process in bytes.
Definition: ai_msg.cpp:335
AI_API int AiMsgGetConsoleFlags(const AtUniverse *universe)
Get the type of messages that will be written to the stdout for a given universe.
Definition: ai_msg.cpp:116
AI_API void AiMsgSetLogFileName(const char *filename)
Enable writing messages to the specified log file.
Definition: ai_msg.cpp:30
This represents a universe in Arnold.