diff --git a/include/asterisk/logger.h b/include/asterisk/logger.h index d8da8d727d44cd17f662455813c2466e73111541..c819d7ac5de83877bebd5dfb7e0194d3c79e991f 100755 --- a/include/asterisk/logger.h +++ b/include/asterisk/logger.h @@ -26,7 +26,27 @@ extern "C" { a; \ } +//! Used for sending a log message +/*! + * \param level don't need to worry about it + * \param file ditto + * \param line ditto + * \param function ditto + * \param fmt this is what is important. The format is the same as your favorite breed of printf. You know how that works, right? :-) + * This is the standard logger function. Probably the only way you will invoke it would be something like this: + * ast_log(LOG_WHATEVER, "Problem with the %s Captain. We should get some more. Will %d be enough?", "flux capacitor", 10); + * where WHATEVER is one of ERROR, DEBUG, EVENT, NOTICE, or WARNING depending on which log you wish to output to. + */ extern void ast_log(int level, char *file, int line, char *function, char *fmt, ...); + +//! Send a verbose message (based on verbose level) +/*! + * This works like ast_log, but prints verbose messages to the console depending on verbosity level set. + * ast_verbose(VERBOSE_PREFIX_3 "Whatever %s is happening\n", "nothing"); + * This will print the message to the console if the verbose level is set to a level >= 3 + * Note the abscence of a comma after the VERBOSE_PREFIX_3. This is important. + * VERBOSE_PREFIX_1 through VERBOSE_PREFIX_3 are defined. + */ extern void ast_verbose(char *fmt, ...); extern int ast_register_verbose(void (*verboser)(char *string, int opos, int replacelast, int complete));