defocus-modules/lib/log.c
Kevin Trogant ffbe68606b Initial commit
First (sort-of) working version of a pinhole camera model.

Improvement idea:
- Stretch result image to the whole size
2023-04-06 18:54:30 +02:00

16 lines
412 B
C

#include <defocus/base.h>
#include <stdio.h>
#include <stdarg.h>
static const char *log_level_names[] = {"VERBOSE", "INFO", "WARN", "ERROR"};
void df_log_impl(int level, const char *file, int line, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
fprintf(stderr, "[%s] %s:%d: ", log_level_names[level], file, line);
vfprintf(stderr, fmt, ap);
fprintf(stderr, "\n");
va_end(ap);
}