#ifndef _LOGGING_SUPP_H
#define _LOGGING_SUPP_H
#include "app_general.h"

#define INFO     (0x01)
#define ERROR    (0x02)
#define WARNING  (0x04)
#define REQUEST  (0x08)
#define PROG_1   (0x10)
#define PROG_2   (0x20)
#define PROG_3   (0x40)
#define PROG_4   (0x80)
#define PROG_5   (0x100)
#define PROG_6   (0x200)
#define FATAL    (0x400)
#define ALLWAYS  (0x8000) /* for logging_supp internal use: not counted */
#define PROG     (PROG_1|PROG_2|PROG_3|PROG_4|PROG_5|PROG_6)
#define LOG_MSG  (INFO|ERROR|WARNING|FATAL)

/* ---- supported in C99 
#define log_ext(flags,str,...) \
 log_data(flags,"%s() [%s:%d] " str,__FUNCTION__,__FILE__,__LINE__,__VA_ARGS__)
------- */
char const * get_flag_hits	(int number, int * hits);
void set_logging 		(char const * filename);
void set_progress		(int flags);
void progress			(int flags, char const * marker);
void log_errno			(int flags, char const * txt);
void log_errno_d		(int flags, char const * txt, int v);
void log_errno_s		(int flags, char const * txt, const char * txt2);
void log_error			(char const * txt);
void log_warning                (char const * txt);
void log_data			(int flags, const char * format, ...);
void log_fd_ip			(int flags, char const * the_string, int fd, unsigned long int ip_addr);

#endif