/* XBT_LOG_MAYDAY: define this to replace the logging facilities with basic
printf function. Useful to debug the logging facilities themselves */
-#include "gras_config.h"
#undef XBT_LOG_MAYDAY
//#define XBT_LOG_MAYDAY
-#ifdef _WIN64
- #define XBT_LOG_MAYDAY
-#endif
#ifndef _XBT_LOG_H_
#define _XBT_LOG_H_
/*
* Do NOT access any members of this structure directly. FIXME: move to private?
*/
-#ifdef _XBT_WIN32
-#define XBT_LOG_BUFF_SIZE 16384 /* Size of the static string in which we build the log string */
-#else
+
#define XBT_LOG_BUFF_SIZE 2048 /* Size of the static string in which we build the log string */
-#endif
+
struct xbt_log_category_s {
xbt_log_category_t parent;
xbt_log_category_t firstChild;
int lineNum;
va_list ap;
va_list ap_copy; /* need a copy to launch dynamic layouts when the static ones overflowed */
-#ifdef _XBT_WIN32
- char *buffer;
-#else
char buffer[XBT_LOG_BUFF_SIZE];
-#endif
};
/**
* code.
* Setting the LogEvent's valist member is done inside _log_logEvent.
*/
-#ifdef _XBT_WIN32
-#include <stdlib.h> /* calloc */
-#define _XBT_LOG_EV_BUFFER_ZERO() \
- _log_ev.buffer = (char*) calloc(XBT_LOG_BUFF_SIZE + 1, sizeof(char))
-#else
+
#include <string.h> /* memset */
#define _XBT_LOG_EV_BUFFER_ZERO() \
memset(_log_ev.buffer, 0, XBT_LOG_BUFF_SIZE)
-#endif
/* Logging Macros */