Documentation ¶
Index ¶
- Constants
- func CreateDir(path string) error
- func ErrorLog(log map[string]interface{}, logId string, scene string, annotation string, ...)
- func FileLog(level string, levelKey string, logId string, values map[string]interface{}, ...)
- func GetDateTime(timezone, format string) string
- func GetTime(timezone string) int64
- func IsExist(f string) bool
- func JSONToMap(s string) map[string]interface{}
- func MapToJSON(m map[string]interface{}) string
- func WriteLog(fileName, msg, file string) error
Constants ¶
View Source
const ( //默认时区 DEFAULTZONE = "Asia/Shanghai" //LOGPATH LOGPATH/time.Now().Format(FORMAT)/*.log LOGPATH = "log/" //FORMAT . FORMAT = "20060102" //LineFeed 换行 LineFeed = "\r\n" )
默认时区
Variables ¶
This section is empty.
Functions ¶
func ErrorLog ¶
func ErrorLog(log map[string]interface{}, logId string, scene string, annotation string, file string)
写错误日志
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.