5.11.0.0R3
Software Development Kit
 
Loading...
Searching...
No Matches
Logging

Functions

WICED_LOG_LEVEL_T wiced_log_get_facility_level (WICED_LOG_FACILITY_T facility)
 
wiced_result_t wiced_log_init (WICED_LOG_LEVEL_T level, log_output platform_output, platform_get_time platform_time)
 
wiced_result_t wiced_log_msg (WICED_LOG_FACILITY_T facility, WICED_LOG_LEVEL_T level, const char *fmt,...)
 
wiced_result_t wiced_log_printf (const char *fmt,...)
 
wiced_result_t wiced_log_set_all_levels (WICED_LOG_LEVEL_T level)
 
wiced_result_t wiced_log_set_facility_level (WICED_LOG_FACILITY_T facility, WICED_LOG_LEVEL_T level)
 
wiced_result_t wiced_log_set_platform_output (log_output platform_output)
 
wiced_result_t wiced_log_set_platform_time (platform_get_time platform_time)
 
wiced_result_t wiced_log_shutdown (void)
 
wiced_result_t wiced_log_vprintf (const char *fmt, va_list varg)
 

Detailed Description

This library implements the WICED Logging API

Function Documentation

◆ wiced_log_get_facility_level()

WICED_LOG_LEVEL_T wiced_log_get_facility_level ( WICED_LOG_FACILITY_T facility)

Get the logging level for a facility.

Parameters
[in]facility: The facility for which to return the log level.
Returns
The current log level.

◆ wiced_log_init()

wiced_result_t wiced_log_init ( WICED_LOG_LEVEL_T level,
log_output platform_output,
platform_get_time platform_time )

Initialize the logging subsystem.

Note
If platform_output is NULL, log messages will be discarded. If platform_time is NULL, wiced_time_get_time() is used for time stamps.
Parameters
[in]level: The initial logging level to use for all facilities.
[in]platform_output: Pointer to the platform output routine for log messages.
[in]platform_time: Optional pointer to a platform time routine for log message time stamps.
Returns
wiced_result_t

◆ wiced_log_msg()

wiced_result_t wiced_log_msg ( WICED_LOG_FACILITY_T facility,
WICED_LOG_LEVEL_T level,
const char * fmt,
... )

Write a log message.

Note
The format arguments are the same as for printf.
Parameters
[in]facility: The facility for the log message.
[in]level: Log level of the message.
[in]fmt: Format control string followed by any optional arguments.
Returns
wiced_result_t

◆ wiced_log_printf()

wiced_result_t wiced_log_printf ( const char * fmt,
... )

Write a log message bypassing the log level check.

Note
The format arguments are the same as for printf.
Parameters
[in]fmt: Format control string followed by any optional arguments.
Returns
wiced_result_t

◆ wiced_log_set_all_levels()

wiced_result_t wiced_log_set_all_levels ( WICED_LOG_LEVEL_T level)

Set the logging level for all facilities.

Parameters
[in]level: The new log level to use.
Returns
wiced_result_t

◆ wiced_log_set_facility_level()

wiced_result_t wiced_log_set_facility_level ( WICED_LOG_FACILITY_T facility,
WICED_LOG_LEVEL_T level )

Set the logging level for a facility.

Parameters
[in]facility: The facility for which to set the log level.
[in]level: The new log level to use.
Returns
wiced_result_t

◆ wiced_log_set_platform_output()

wiced_result_t wiced_log_set_platform_output ( log_output platform_output)

Set the platform output routine for log messages.

Note
If platform_output is NULL, log messages will be discarded.
Parameters
[in]platform_output: Pointer to the platform output routine for log messages.
Returns
wiced_result_t

◆ wiced_log_set_platform_time()

wiced_result_t wiced_log_set_platform_time ( platform_get_time platform_time)

Set the platform routine for getting time stamps for log messages.

Note
If platform_time is NULL, wiced_time_get_time() is used for time stamps.
Parameters
[in]platform_time: Pointer to a platform time routine for log message time stamps.
Returns
wiced_result_t

◆ wiced_log_shutdown()

wiced_result_t wiced_log_shutdown ( void )

Shutdown the logging subsystem.

Returns
wiced_result_t

◆ wiced_log_vprintf()

wiced_result_t wiced_log_vprintf ( const char * fmt,
va_list varg )

Write a log message bypassing the log level check.

Note
The format arguments are the same as for vprintf.
Parameters
[in]fmt: Format control string.
[in]varg: va_list of arguments.
Returns
wiced_result_t