8 const char red_color[] = {
9 0x1b, 0x5b, 0x30, 0x3b, 0x33, 0x31, 0x3b, 0x34, 0x30, 0x6d, 0x0,
12 const char green_color[] = {
13 0x1b, 0x5b, 0x30, 0x3b, 0x33, 0x32, 0x3b, 0x34, 0x30, 0x6d, 0x0,
16 const char normal_color[] = {
17 0x1b, 0x5b, 0x30, 0x3b, 0x33, 0x37, 0x3b, 0x34, 0x30, 0x6d, 0x0,
22 void print_trace(const char *file, int line, int color, int l,
34 vsnprintf(trace, sizeof(trace), fmt, args);
37 strftime(time, sizeof(time), "%d.%m.%Y %T ", localtime(&t));
39 fprintf(stderr, "%s%s [%5d.%d] %s:%d %s %s",
41 getpid(), get_parent_count(),
42 file, line, normal_color, trace);