xdg-desktop-portal-hyprland/include/logger.h

22 lines
414 B
C
Raw Normal View History

2020-02-20 20:59:46 +01:00
#ifndef LOGGER_H
#define LOGGER_H
#include <stdarg.h>
2020-02-20 20:59:46 +01:00
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
enum LOGLEVEL { QUIET, ERROR, WARN, INFO, DEBUG, TRACE };
2020-02-20 20:59:46 +01:00
struct logger_properties {
2020-02-20 20:59:46 +01:00
enum LOGLEVEL level;
FILE *dst;
2020-02-20 20:59:46 +01:00
};
void init_logger(FILE *dst, enum LOGLEVEL level);
2020-02-20 20:59:46 +01:00
enum LOGLEVEL get_loglevel(const char *level);
void logprint(enum LOGLEVEL level, char *msg, ...);
#endif