Archived
1
0
Fork 0
This repository has been archived on 2026-05-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
archived/src/log.h
Henrik Hautakoski f46ae1970b Change indentation to follow the updated standard.
Alot of mixed indentation. use 4 chars wide soft tabs.
2011-03-19 12:28:48 +02:00

32 lines
850 B
C

/* log.h
*
* Copyright (C) 2010 Henrik Hautakoski <henrik@fiktivkod.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#ifndef __LOG_H
#define __LOG_H
#include <stdarg.h>
#include <stddef.h>
#define LOG_INFO (1<<0)
#define LOG_WARN (1<<1)
#define LOG_CRIT (1<<2)
#define LOG_DEBUG (1<<3)
#define LOG_ALL (LOG_INFO | LOG_WARN | LOG_CRIT | LOG_DEBUG)
void init_log(unsigned level, const char *path);
unsigned logstrtolvl(const char *str);
const char* loglvltostr(unsigned level);
void logmsg(unsigned level, const char *fmt, ...);
void logerrno(unsigned level, const char *prefix, int err);
#endif /* __LOG_H */