Andrew Reed / Mbed OS CITY1082-i2c_master_wifi_mqtt
Embed: (wiki syntax)

« Back to documentation index

cy_log.h File Reference

cy_log.h File Reference

Go to the source code of this file.

Typedefs

typedef int(* log_output )(CY_LOG_FACILITY_T facility, CY_LOG_LEVEL_T level, char *logmsg)
 Prototype for application callback to use the logging message.
typedef cy_rslt_t(* platform_get_time )(uint32_t *time)
 Prototype for application callback to get current time in milliseconds.

Enumerations

enum  CY_LOG_LEVEL_T {
  CY_LOG_OFF = 0, CY_LOG_ERR, CY_LOG_WARNING, CY_LOG_NOTICE,
  CY_LOG_INFO, CY_LOG_DEBUG, CY_LOG_DEBUG1, CY_LOG_DEBUG2,
  CY_LOG_DEBUG3, CY_LOG_DEBUG4
}
 

Logging levels.

More...
enum  CY_LOG_FACILITY_T {
  CYLF_DEF = 0, CYLF_TEST, CYLF_DRIVER, CYLF_LP,
  CYLF_MIDDLEWARE, CYLF_AUDIO, CYLF_MAX
}
 

Log Facility type Log facilities allow for separate subsystems to have different run-time log levels for output.

More...

Functions

cy_rslt_t cy_log_init (CY_LOG_LEVEL_T level, log_output platform_output, platform_get_time platform_time)
 Initialize the logging subsystem.
cy_rslt_t cy_log_shutdown (void)
 Shutdown the logging subsystem.
cy_rslt_t cy_log_set_platform_output (log_output platform_output)
 Set the platform output routine for log messages.
cy_rslt_t cy_log_set_platform_time (platform_get_time platform_time)
 Set the platform routine for getting time stamps for log messages.
cy_rslt_t cy_log_set_facility_level (CY_LOG_FACILITY_T facility, CY_LOG_LEVEL_T level)
 Set the logging level for a facility.
cy_rslt_t cy_log_set_all_levels (CY_LOG_LEVEL_T level)
 Set the logging level for all facilities.
CY_LOG_LEVEL_T cy_log_get_facility_level (CY_LOG_FACILITY_T facility)
 Get the logging level for a facility.
cy_rslt_t cy_log_msg (CY_LOG_FACILITY_T facility, CY_LOG_LEVEL_T level, const char *fmt,...)
 Write a log message.
cy_rslt_t cy_log_printf (const char *fmt,...)
 Write a log message bypassing the log level check.
cy_rslt_t cy_log_vprintf (const char *fmt, va_list varg)
 Write a log message bypassing the log level check using va_list.

Detailed Description

Definition in file cy_log.h.