Add debug_set_threshold() and thresholding of messages
This commit is contained in:
parent
92478c37a6
commit
c73079a78c
9 changed files with 107 additions and 34 deletions
|
@ -52,14 +52,6 @@
|
|||
|
||||
/* \} name SECTION: Module settings */
|
||||
|
||||
/**
|
||||
* \brief Set the log mode for the debug functions globally
|
||||
* (Default value: POLARSSL_DEBUG_DFL_MODE)
|
||||
*
|
||||
* \param log_mode The log mode to use (POLARSSL_DEBUG_LOG_FULL or
|
||||
* POLARSSL_DEBUG_LOG_RAW)
|
||||
*/
|
||||
void debug_set_log_mode( int log_mode );
|
||||
|
||||
#define SSL_DEBUG_MSG( level, args ) \
|
||||
debug_print_msg( ssl, level, __FILE__, __LINE__, debug_fmt args );
|
||||
|
@ -100,6 +92,24 @@ void debug_set_log_mode( int log_mode );
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Set the log mode for the debug functions globally
|
||||
* (Default value: POLARSSL_DEBUG_DFL_MODE)
|
||||
*
|
||||
* \param log_mode The log mode to use (POLARSSL_DEBUG_LOG_FULL or
|
||||
* POLARSSL_DEBUG_LOG_RAW)
|
||||
*/
|
||||
void debug_set_log_mode( int log_mode );
|
||||
|
||||
/**
|
||||
* \brief Set the level threshold to handle globally. Messages that have a
|
||||
* level over the threshold value are ignored.
|
||||
* (Default value: 0 (No debug))
|
||||
*
|
||||
* \param threshold maximum level of messages to pass on
|
||||
*/
|
||||
void debug_set_threshold( int threshold );
|
||||
|
||||
char *debug_fmt( const char *format, ... );
|
||||
|
||||
void debug_print_msg( const ssl_context *ssl, int level,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue