# logs **Repository Path**: linux_gc/mylogs ## Basic Information - **Project Name**: logs - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2014-07-30 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README mylogs ====== 1.write logs to file 2.send logs to server use va_list va_start va_end to treatment of variable parameters(可变参数的处理) use time_t and struct tm localtime() to get the time now use access(path, 0) to check the path is exist or not use mkdir(filename, 0775) to create the file use fopen(, "a") to add the log message to the end of the file use sprintf() create the log message string use fprintf() write the log to the file