Add Doxyfile, change docs
This commit is contained in:
+22
-19
@@ -63,16 +63,16 @@ struct uc_log_destination;
|
||||
|
||||
/* Returns a string representation of the log level.
|
||||
*
|
||||
* @ll The log level
|
||||
* @param ll The log level
|
||||
* @return String representation of the log level. (This will be a string literal)
|
||||
*/
|
||||
const char *uc_ll_2_str(enum UC_LOG_LEVEL l);
|
||||
|
||||
/* creates a new uc_log_destination for printing on stderr.
|
||||
*
|
||||
* @log_level log level of this destination. only log messages
|
||||
* @param log_level log level of this destination. only log messages
|
||||
* with a log level >= the log level of the destination are actually logged.
|
||||
* @log_location whether to log info about the source file and line number
|
||||
* @param log_location whether to log info about the source file and line number
|
||||
* in a log message.
|
||||
*
|
||||
* @return An opaque uc_log_destination that can be added as a destination to
|
||||
@@ -82,11 +82,11 @@ struct uc_log_destination *uc_log_new_stderr(int log_level, int log_location);
|
||||
|
||||
/* creates a new uc_log_destination for logging to syslog
|
||||
*
|
||||
* @ident The ident as used in the syslog openlog() funcion
|
||||
* @facility The facility as used in the syslog openlog() function()
|
||||
* @log_level log level of this destination. only log messages
|
||||
* @param ident The ident as used in the syslog openlog() funcion
|
||||
* @param facility The facility as used in the syslog openlog() function()
|
||||
* @param log_level log level of this destination. only log messages
|
||||
* with a log level >= the log level of the destination are actually logged.
|
||||
* @log_location whether to log info about the source file and line number
|
||||
* @param log_location whether to log info about the source file and line number
|
||||
* in a log message.
|
||||
* @return An opaque uc_log_destination that can be added as a destination to
|
||||
* the ucore logging system
|
||||
@@ -95,44 +95,47 @@ struct uc_log_destination *uc_log_new_syslog(const char *ident, int facility, in
|
||||
|
||||
/* creates a new uc_log_destination for printing on stderr.
|
||||
*
|
||||
* @log_level log level of this destination. only log messages
|
||||
* @param log_level log level of this destination. only log messages
|
||||
* with a log level >= the log level of the destination are actually logged.
|
||||
* @log_location whether to log info about the source file and line number
|
||||
* @param log_location whether to log info about the source file and line number
|
||||
* in a log message.
|
||||
* @return An opaque uc_log_destination that can be added as a destination to
|
||||
* @param return An opaque uc_log_destination that can be added as a destination to
|
||||
* the ucore logging system
|
||||
*/
|
||||
struct uc_log_destination *uc_log_new_file(const char *filename, int log_level, int log_location);
|
||||
|
||||
/** Add a uc_log_destination to the logging system.
|
||||
*
|
||||
* @dest The uc_log_destination to add.
|
||||
* @param dest The uc_log_destination to add.
|
||||
*/
|
||||
void uc_log_add_destination(struct uc_log_destination *dest);
|
||||
|
||||
/** Remove a log destination.
|
||||
*
|
||||
* @dest The uc_log_destination to remove.
|
||||
* @param dest The uc_log_destination to remove.
|
||||
*/
|
||||
void uc_log_remove_destination(struct uc_log_destination *dest);
|
||||
|
||||
/** Change the log level of a module.
|
||||
*
|
||||
* @module The module to change, matched against the id member of a struct uc_log_module
|
||||
* @param module The module to change, matched against the id member of a struct uc_log_module
|
||||
* @param level The log level for this module
|
||||
*
|
||||
* @return 0 on success, non-zero if the module was not found.
|
||||
*/
|
||||
int uc_log_module_set_loglevel(int module, enum UC_LOG_LEVEL level);
|
||||
|
||||
/** Closes and re-opens all the UC_LDEST_FILE log destinations.
|
||||
* Intended for use when a log file is rotated externally.
|
||||
*
|
||||
* @return 0 on success, non-zero if an error occured when re-opening a file.
|
||||
* @param return 0 on success, non-zero if an error occured when re-opening a file.
|
||||
*/
|
||||
int uc_log_reopen_files(void);
|
||||
|
||||
/** Init the logging system. This function must be called before performing any other
|
||||
* logging action.
|
||||
*
|
||||
* @user_struct containing an array of all the modules defined by the application.
|
||||
* @param user_struct containing an array of all the modules defined by the application.
|
||||
*/
|
||||
void uc_log_init(struct uc_log_modules *user_modules);
|
||||
|
||||
@@ -149,10 +152,10 @@ void uc_logf(int log_level, int module, const char *file, int line, const char *
|
||||
* For log messages with UC_LL_DEBUG, the UC_DEBUGF() macro can be used,
|
||||
* UC_DEBUGF will only be compiled in if the DEBUG macro is defined
|
||||
*
|
||||
* @lvl log level of this log message
|
||||
* @mod module id of this log messagex.
|
||||
* @fmt printf style format string
|
||||
* @... printf style arguments
|
||||
* @param lvl log level of this log message
|
||||
* @param mod module id of this log messagex.
|
||||
* @param fmt printf style format string
|
||||
* @param ... printf style arguments
|
||||
*/
|
||||
#define UC_LOGF(lvl, mod, fmt, ...) uc_logf(lvl, mod, __FILE__, __LINE__, fmt, ## __VA_ARGS__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user