Logger

>w## Notice > * please include the header file "logger.h" when you need to print the serial port log information `#include "logger.h"` >i## LOGD ### Prototype `void LOGD(char *, ...);` ### Function * print debug information by serial port ### Parameter |Name|Type|description| |-|-|-| |variable parameter||the same with standard "print"| ### Retval |Value|Type|Description| |-|-|-| |none||| >i## LOGE ### Prototype `void LOGE(char *, ...);` ### Function * print error information by serial port ### Parameter |Name|Type|description| |-|-|-| |variable parameter||the same with standard "print"| ### Retval |Value|Type|Description| |-|-|-| |none||| >i## LOGI ### Prototype `void LOGI(char *, ...);` ### Function * print general information by serial port ### Parameter |Name|Type|description| |-|-|-| |variable parameter||the same with standard "print"| ### Retval |Value|Type|Description| |-|-|-| |none||| >i## LOGV ### Prototype `void LOGV(char *, ...);` ### Function * print detailed information by serial port ### Parameter |Name|Type|description| |-|-|-| |variable parameter||the same with standard "print"| ### Retval |Value|Type|Description| |-|-|-| |none||| >i## logger_serial_dump_buff ### Prototype `void logger_serial_dump_buff(char *title, void *buff, unsigned int len);` ### Function * print array buffer information in hex by serial port ### Parameter |Name|Type|description| |-|-|-| |title|char *|print title| |buff|void *|print buffer| |len|unsigned int|buff data length| ### Retval |Value|Type|Description| |-|-|-| |none||| >i## LogToATPortEnable ### Prototype `void LogToATPortEnable(int en);` ### Function * enable log print from AT port or not ### Parameter |Name|Type|description| |-|-|-| |en|int|1-yes, 0-no| ### Retval |Value|Type|Description| |-|-|-| |none||| >i## sendTimeforNow ### Prototype `void sendTimeforNow(char* msg);` ### Function * print log and current time information ### Parameter |Name|Type|description| |-|-|-| |msg|char *|print information| ### Retval |Value|Type|Description| |-|-|-| |none||| >s## Example ``` int len = 1; char temp[] = "test"; LogToATPortEnable(1); sendTimeforNow("test_1\r\n"); LOGD("smartpeak %d\r\n", len); LOGE("smartpeak %02X\r\n", len); LOGI("smartpeak %s\r\n", temp); LOGV("smartpeak %p\r\n", temp); logger_serial_dump_buff("temp:", temp, strlen(temp)); sendTimeforNow("test_2\r\n"); ```