mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
49 lines
999 B
C
Executable File
49 lines
999 B
C
Executable File
/*
|
|
* Cheops Next Generation
|
|
*
|
|
* Mark Spencer <markster@marko.net>
|
|
*
|
|
* Copyright(C) Mark Spencer
|
|
*
|
|
* Distributed under the terms of the GNU General Public License (GPL) Version
|
|
*
|
|
* Logging routines
|
|
*
|
|
*/
|
|
|
|
#ifndef _LOGGER_H
|
|
#define _LOGGER_H
|
|
|
|
#include <stdarg.h>
|
|
|
|
#if defined(__cplusplus) || defined(c_plusplus)
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define EVENTLOG "event_log"
|
|
|
|
#define DEBUG_M(a) { \
|
|
a; \
|
|
}
|
|
|
|
extern void ast_log(int level, char *file, int line, char *function, char *fmt, ...);
|
|
extern void ast_verbose(char *fmt, ...);
|
|
|
|
extern int ast_register_verbose(void (*verboser)(char *string, int opos, int replacelast, int complete));
|
|
extern int ast_unregister_verbose(void (*verboser)(char *string, int opos, int replacelast, int complete));
|
|
|
|
#define _A_ __FILE__, __LINE__, __PRETTY_FUNCTION__
|
|
|
|
#define LOG_DEBUG 0, _A_
|
|
#define LOG_EVENT 1, _A_
|
|
#define LOG_NOTICE 2, _A_
|
|
#define LOG_WARNING 3, _A_
|
|
#define LOG_ERROR 4, _A_
|
|
|
|
#if defined(__cplusplus) || defined(c_plusplus)
|
|
}
|
|
#endif
|
|
|
|
|
|
#endif
|