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

20 lines
368 B
C
Raw Normal View History

2020-02-20 20:59:46 +01:00
#ifndef LOGGER_H
#define LOGGER_H
#include <stdio.h>
#define DEFAULT_LOGLEVEL ERROR
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