Exemplo n.º 1
0
static inline wbLogEntry_t wbLogEntry_new() {
  wbLogEntry_t elem;

  elem = wbNew(struct st_wbLogEntry_t);

  wbLogEntry_setMessage(elem, NULL);
  wbLogEntry_setTime(elem, _hrtime());
#ifndef NDEBUG
  wbLogEntry_setLevel(elem, wbLogLevel_TRACE);
#else
  wbLogEntry_setLevel(elem, wbLogLevel_OFF);
#endif
  wbLogEntry_setNext(elem, NULL);

  wbLogEntry_setLine(elem, -1);
  wbLogEntry_setFile(elem, NULL);
  wbLogEntry_setFunction(elem, NULL);

  return elem;
}
Exemplo n.º 2
0
static inline wbLogEntry_t
wbLogEntry_initialize(wbLogLevel_t level, string msg, const char *file,
                      const char *fun, int line) {
  wbLogEntry_t elem;

  elem = wbLogEntry_new();

  wbLogEntry_setLevel(elem, level);

  wbLogEntry_setMessage(elem, wbString_duplicate(msg));

  wbLogEntry_setLine(elem, line);
  wbLogEntry_setFile(elem, file);
  wbLogEntry_setFunction(elem, fun);

  return elem;
}
Exemplo n.º 3
0
static inline wbLogEntry_t wbLogEntry_new() {
  wbLogEntry_t elem;

  elem = wbNew(struct st_wbLogEntry_t);

  wbLogEntry_setId(elem, uuid());
  wbLogEntry_setSessionId(elem, sessionId());
  wbLogEntry_setMessage(elem, NULL);
  wbLogEntry_setMPIRank(elem, wbMPI_getRank());
  wbLogEntry_setTime(elem, _hrtime());

  wbLogEntry_setLevel(elem, wbLogLevel_TRACE);

  wbLogEntry_setNext(elem, NULL);

  wbLogEntry_setLine(elem, -1);
  wbLogEntry_setFile(elem, NULL);
  wbLogEntry_setFunction(elem, NULL);

  return elem;
}