summaryrefslogtreecommitdiff
path: root/src/utils/log.c
blob: f54394ab2c820b09cb493e924bf012fde8dce37c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "log.h"

#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>

void _printLogBack(const char *format, const char *file, int line, ...) {
  va_list args;
  va_start(args, end);
  char *errorStr;
  vasprintf(&errorStr, format, args);

  printf("\e[0;31mError: %s at compiler %s:%d\e[0m\n", errorStr, file, line);
  free(errorStr);
}