🏆 Join the TuyaOpen AI Hardware Contest! 100 days to build the future of AI devicesLearn More →
Skip to main content

tkl_output | Log Output

The tkl_output.c file provides log output functionality, allowing for the output, closing, and opening of logs within the Tuya Smart system (TuyaOS) environment. This file is automatically generated to enable developers to add their own implementation code within specific areas.

API Description​

tkl_log_output​

void tkl_log_output(const char *format, ...);

Functionality​

Outputs log information.

Parameters​

  • format: A pointer to a format string, followed by a variable number of arguments.

Return Value​

No return value.

tkl_log_close​

OPERATE_RET tkl_log_close(void);

Functionality​

Closes the log port.

Parameters​

No parameters.

Return Value​

A return value of OPRT_OK indicates that the log port was successfully closed. Other values indicate failure, see tuya_error_code.h for specific error codes.

tkl_log_open​

OPERATE_RET tkl_log_open(void);

Functionality​

Opens the log port.

Parameters​

No parameters.

Return Value​

A return value of OPRT_OK indicates that the log port was successfully opened. Other values indicate failure, see tuya_error_code.h for specific error codes.