SimGrid  3.14.159
Versatile Simulation of Distributed Systems
xbt_log_layout_format.c File Reference
#include "src/internal_config.h"
#include "xbt/sysdep.h"
#include "xbt/strbuff.h"
#include "src/xbt/log_private.h"
#include "simgrid/simix.h"
#include "surf/surf.h"
#include <stdio.h>

Macros

#define ERRMSG
 
#define check_overflow(len)
 
#define set_sz_from_precision()
 
#define show_it(data, letter)
 
#define show_string(data)
 
#define show_int(data)   show_it(data, "d")
 
#define show_double(data)   show_it(data, "f")
 

Functions

static int xbt_log_layout_format_doit (xbt_log_layout_t l, xbt_log_event_t ev, const char *msg_fmt)
 
static void xbt_log_layout_format_free (xbt_log_layout_t lay)
 
xbt_log_layout_t xbt_log_layout_format_new (char *arg)
 

Variables

const char * xbt_log_priority_names [8]
 
static double format_begin_of_time = -1
 

Macro Definition Documentation

◆ ERRMSG

#define ERRMSG
Value:
"Unknown %%%c sequence in layout format (%s).\n" \
"Known sequences:\n" \
" what: %%m: user message %%c: log category %%p: log priority\n" \
" where:\n" \
" source: %%F: file %%L: line %%M: function %%l: location (%%F:%%L)\n" \
" runtime: %%h: hostname %%t: thread %%P: process %%i: PID\n" \
" backtrace: %%b: full %%B: short\n" \
" when: %%d: date %%r: app. age\n" \
" other: %%%%: %% %%n: new line %%e: plain space\n"

◆ check_overflow

#define check_overflow (   len)
Value:
if ((rem_size -= (len)) > 0) { \
p += (len); \
} else \
return 0
void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Op MPI_Win win void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Aint MPI_Info void baseptr void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Comm int keyval MPI_Comm int void attr_value void int MPI_Datatype int MPI_Comm comm MPI_Comm int int int int MPI_Comm comm_cart MPI_Comm int int int int coords MPI_Comm int int int int dest MPI_Comm MPI_Comm int result MPI_Comm MPI_Group MPI_Comm newcomm MPI_Comm comm int keyval MPI_Comm int void int flag MPI_Comm MPI_Group group MPI_Comm int void attribute_val MPI_Comm int int MPI_Comm comm_out int int errorclass int flag void baseptr void int MPI_Datatype void int int MPI_Datatype int MPI_Comm comm MPI_Status MPI_Datatype int count char int resultlen void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Win win MPI_Group MPI_Group MPI_Group newgroup MPI_Group group MPI_Group MPI_Group MPI_Group newgroup MPI_Group int int MPI_Group newgroup MPI_Group int size MPI_Group MPI_Group MPI_Group newgroup MPI_Info char key MPI_Info info MPI_Info int nkeys MPI_Info char int int flag int flag int char int int provided void int MPI_Datatype int int MPI_Comm MPI_Request request void int MPI_Datatype int int MPI_Comm MPI_Request request MPI_Copy_function MPI_Delete_function int void extra_state MPI_User_function int MPI_Op op int MPI_Datatype MPI_Comm int size int int MPI_Comm MPI_Status status int provided void int MPI_Datatype int int MPI_Comm MPI_Status status void void int MPI_Datatype MPI_Op MPI_Comm comm void void int MPI_Datatype MPI_Op int MPI_Comm comm void void int MPI_Datatype MPI_Op MPI_Comm comm void int int MPI_Datatype void int MPI_Datatype int MPI_Comm comm void int MPI_Datatype int int int int MPI_Comm MPI_Status status void int MPI_Datatype int int MPI_Comm comm void int MPI_Datatype int int MPI_Comm comm MPI_Request request int MPI_Request int int MPI_Status status int MPI_Request int int MPI_Status statuses int MPI_Datatype MPI_Datatype newtype int int MPI_Aint MPI_Datatype MPI_Datatype new_type int int int MPI_Datatype MPI_Datatype newtype MPI_Type_copy_attr_function MPI_Type_delete_attr_function int void extra_state int int MPI_Aint MPI_Datatype MPI_Datatype newtype MPI_Datatype MPI_Datatype newdatatype int keyval MPI_Datatype int void int flag MPI_Datatype char int * len
Definition: smpi_mpi.cpp:163

◆ set_sz_from_precision

#define set_sz_from_precision ( )
Value:
if (1) { \
sz = rem_size; \
if (precision != -1) { \
if (precision < sz) \
sz = precision + 1; /* +1 for the final '\0' */ \
precision = -1; \
} \
} else (void)0

◆ show_it

#define show_it (   data,
  letter 
)
Value:
if (1) { \
int len, wd; \
if (length == -1) { \
wd = 0; \
} else { \
wd = length; \
length = -1; \
} \
if (precision == -1) { \
len = snprintf(p, rem_size, "%*" letter, wd, data); \
} else { \
len = snprintf(p, rem_size, "%*.*" letter, wd, precision, data); \
precision = -1; \
} \
check_overflow(len); \
} else (void)0
void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Op MPI_Win win void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Aint MPI_Info void baseptr void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Comm int keyval MPI_Comm int void attr_value void int MPI_Datatype int MPI_Comm comm MPI_Comm int int int int MPI_Comm comm_cart MPI_Comm int int int int coords MPI_Comm int int int int dest MPI_Comm MPI_Comm int result MPI_Comm MPI_Group MPI_Comm newcomm MPI_Comm comm int keyval MPI_Comm int void int flag MPI_Comm MPI_Group group MPI_Comm int void attribute_val MPI_Comm int int MPI_Comm comm_out int int errorclass int flag void baseptr void int MPI_Datatype void int int MPI_Datatype int MPI_Comm comm MPI_Status MPI_Datatype int count char int resultlen void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Win win MPI_Group MPI_Group MPI_Group newgroup MPI_Group group MPI_Group MPI_Group MPI_Group newgroup MPI_Group int int MPI_Group newgroup MPI_Group int size MPI_Group MPI_Group MPI_Group newgroup MPI_Info char key MPI_Info info MPI_Info int nkeys MPI_Info char int int flag int flag int char int int provided void int MPI_Datatype int int MPI_Comm MPI_Request request void int MPI_Datatype int int MPI_Comm MPI_Request request MPI_Copy_function MPI_Delete_function int void extra_state MPI_User_function int MPI_Op op int MPI_Datatype MPI_Comm int size int int MPI_Comm MPI_Status status int provided void int MPI_Datatype int int MPI_Comm MPI_Status status void void int MPI_Datatype MPI_Op MPI_Comm comm void void int MPI_Datatype MPI_Op int MPI_Comm comm void void int MPI_Datatype MPI_Op MPI_Comm comm void int int MPI_Datatype void int MPI_Datatype int MPI_Comm comm void int MPI_Datatype int int int int MPI_Comm MPI_Status status void int MPI_Datatype int int MPI_Comm comm void int MPI_Datatype int int MPI_Comm comm MPI_Request request int MPI_Request int int MPI_Status status int MPI_Request int int MPI_Status statuses int MPI_Datatype MPI_Datatype newtype int int MPI_Aint MPI_Datatype MPI_Datatype new_type int int int MPI_Datatype MPI_Datatype newtype MPI_Type_copy_attr_function MPI_Type_delete_attr_function int void extra_state int int MPI_Aint MPI_Datatype MPI_Datatype newtype MPI_Datatype MPI_Datatype newdatatype int keyval MPI_Datatype int void int flag MPI_Datatype char int * len
Definition: smpi_mpi.cpp:163

◆ show_string

#define show_string (   data)
Value:
if (1) { \
const char *show_string_data = (data); \
show_it(show_string_data ? show_string_data : "(null)", "s"); \
} else (void)0

◆ show_int

#define show_int (   data)    show_it(data, "d")

◆ show_double

#define show_double (   data)    show_it(data, "f")

Function Documentation

◆ xbt_log_layout_format_doit()

static int xbt_log_layout_format_doit ( xbt_log_layout_t  l,
xbt_log_event_t  ev,
const char *  msg_fmt 
)
static

◆ xbt_log_layout_format_free()

static void xbt_log_layout_format_free ( xbt_log_layout_t  lay)
static

◆ xbt_log_layout_format_new()

xbt_log_layout_t xbt_log_layout_format_new ( char *  arg)

Variable Documentation

◆ xbt_log_priority_names

const char* xbt_log_priority_names[8]

◆ format_begin_of_time

double format_begin_of_time = -1
static