2009-05-08 11:04:25 -04:00
|
|
|
|
|
|
|
#ifndef __LOGGER_H__
|
|
|
|
#define __LOGGER_H__
|
|
|
|
|
2009-06-01 10:01:47 -04:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2009-05-08 11:04:25 -04:00
|
|
|
/* Log domains */
|
2015-10-09 17:58:27 -04:00
|
|
|
#define L_CONF 0
|
|
|
|
#define L_DAAP 1
|
|
|
|
#define L_DB 2
|
|
|
|
#define L_HTTPD 3
|
|
|
|
#define L_HTTP 4
|
|
|
|
#define L_MAIN 5
|
|
|
|
#define L_MDNS 6
|
|
|
|
#define L_MISC 7
|
|
|
|
#define L_RSP 8
|
|
|
|
#define L_SCAN 9
|
|
|
|
#define L_XCODE 10
|
2009-05-08 12:17:01 -04:00
|
|
|
/* libevent logging */
|
2015-10-09 17:58:27 -04:00
|
|
|
#define L_EVENT 11
|
|
|
|
#define L_REMOTE 12
|
|
|
|
#define L_DACP 13
|
|
|
|
#define L_FFMPEG 14
|
|
|
|
#define L_ART 15
|
|
|
|
#define L_PLAYER 16
|
|
|
|
#define L_RAOP 17
|
|
|
|
#define L_LAUDIO 18
|
|
|
|
#define L_DMAP 19
|
|
|
|
#define L_DBPERF 20
|
|
|
|
#define L_SPOTIFY 21
|
|
|
|
#define L_LASTFM 22
|
|
|
|
#define L_CACHE 23
|
|
|
|
#define L_MPD 24
|
|
|
|
#define L_STREAMING 25
|
2016-01-17 14:59:16 -05:00
|
|
|
#define L_CAST 26
|
2016-10-25 15:23:09 -04:00
|
|
|
#define L_FIFO 27
|
2016-12-31 01:28:18 -05:00
|
|
|
#define L_LIB 28
|
2017-08-12 14:00:12 -04:00
|
|
|
#define L_WEB 29
|
2015-10-09 17:58:27 -04:00
|
|
|
|
2017-08-12 14:00:12 -04:00
|
|
|
#define N_LOGDOMAINS 30
|
2009-05-08 11:04:25 -04:00
|
|
|
|
|
|
|
/* Severities */
|
|
|
|
#define E_FATAL 0
|
|
|
|
#define E_LOG 1
|
|
|
|
#define E_WARN 2
|
|
|
|
#define E_INFO 3
|
|
|
|
#define E_DBG 4
|
|
|
|
#define E_SPAM 5
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-03-07 04:36:33 -05:00
|
|
|
DPRINTF(int severity, int domain, const char *fmt, ...) __attribute__((format(printf, 3, 4)));
|
2009-05-08 11:04:25 -04:00
|
|
|
|
2010-03-07 04:45:15 -05:00
|
|
|
void
|
|
|
|
logger_ffmpeg(void *ptr, int level, const char *fmt, va_list ap);
|
|
|
|
|
2009-05-08 12:17:01 -04:00
|
|
|
void
|
|
|
|
logger_libevent(int severity, const char *msg);
|
|
|
|
|
2017-01-06 03:44:18 -05:00
|
|
|
#ifdef HAVE_ALSA
|
2010-05-02 04:50:52 -04:00
|
|
|
void
|
|
|
|
logger_alsa(const char *file, int line, const char *function, int err, const char *fmt, ...);
|
|
|
|
#endif
|
|
|
|
|
2009-05-08 11:04:25 -04:00
|
|
|
void
|
|
|
|
logger_reinit(void);
|
|
|
|
|
|
|
|
void
|
|
|
|
logger_domains(void);
|
|
|
|
|
|
|
|
void
|
|
|
|
logger_detach(void);
|
|
|
|
|
|
|
|
int
|
|
|
|
logger_init(char *file, char *domains, int severity);
|
|
|
|
|
|
|
|
void
|
|
|
|
logger_deinit(void);
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* !__LOGGER_H__ */
|