mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2025-02-17 01:12:06 +01:00
29 lines
445 B
C
29 lines
445 B
C
|
#ifndef LOGGER_H
|
||
|
#define LOGGER_H
|
||
|
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <stdarg.h>
|
||
|
#include <string.h>
|
||
|
#include <time.h>
|
||
|
|
||
|
enum LOGLEVEL {
|
||
|
QUIET,
|
||
|
ERROR,
|
||
|
WARN,
|
||
|
INFO,
|
||
|
DEBUG,
|
||
|
TRACE
|
||
|
};
|
||
|
|
||
|
struct logger_properties{
|
||
|
enum LOGLEVEL level;
|
||
|
FILE *__restrict__ dst;
|
||
|
};
|
||
|
|
||
|
void init_logger(FILE *__restrict__ dst, enum LOGLEVEL level);
|
||
|
enum LOGLEVEL get_loglevel(const char *level);
|
||
|
void logprint(enum LOGLEVEL level, char *msg, ...);
|
||
|
|
||
|
#endif
|