Annotation of embedaddon/coova-chilli/src/syserr.h, revision 1.1
1.1 ! misho 1: /*
! 2: *
! 3: * Syslog functions.
! 4: * Copyright (C) 2003, 2004 Mondru AB.
! 5: * Copyright (c) 2006-2007 David Bird <david@coova.com>
! 6: *
! 7: * The contents of this file may be used under the terms of the GNU
! 8: * General Public License Version 2, provided that the above copyright
! 9: * notice and this permission notice is included in all copies or
! 10: * substantial portions of the software.
! 11: *
! 12: */
! 13:
! 14: #ifndef _SYSERR_H
! 15: #define _SYSERR_H
! 16:
! 17: #define SYSERR_MSGSIZE 256
! 18:
! 19: void sys_err(int pri, char *filename, int line, int en, const char *fmt, ...);
! 20: void sys_errpack(int pri, char *fn, int ln, int en, struct sockaddr_in *peer,
! 21: void *pack, unsigned len, char *fmt, ...);
! 22:
! 23: #define log(p,fmt,args...) sys_err(p, __FILE__,__LINE__,0,fmt,## args)
! 24: #define log_dbg(fmt,args...) if (options.debug) { \
! 25: sys_err(LOG_DEBUG, __FILE__,__LINE__,0,fmt,## args); }
! 26: #define log_warn(e,fmt,args...) sys_err(LOG_WARNING, __FILE__,__LINE__,e,fmt,## args)
! 27: #define log_info(fmt,args...) sys_err(LOG_NOTICE, __FILE__,__LINE__,0,fmt,## args)
! 28: #define log_err(e,fmt,args...) sys_err(LOG_ERR, __FILE__,__LINE__,e,fmt,## args)
! 29:
! 30: #endif /* !_SYSERR_H */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>