//createLogMessage function creates a new log message with actual content variables
createLogMessage function creates a new log message with actual content variables
// createLogMessage function creates a new log message with actual content variables
func handleLog(l *Logger, logMsg *LogMessage) {
	if l.includeFunction {
		pc, _, no, _ := runtime.Caller(2)
		details := runtime.FuncForPC(pc)
		fnNameSplit := strings.Split(details.Name(), "/")
		logMsg.FnName = fnNameSplit[len(fnNameSplit)-1]
		if l.includeLine {
			logMsg.Line = no
		}
	}
	if logConfig.Async {
		logMsgChannel <- logMsg
	} else {
		doLog(logMsg)
	}
}
func handleLog ( l * Logger , logMsg * LogMessage ) { if l . includeFunction { pc , _ , no , _ := runtime . Caller ( 2 ) details := runtime . FuncForPC ( pc ) fnNameSplit := strings . Split ( details . Name ( ) , " " ) logMsg . FnName = fnNameSplit [ len ( fnNameSplit ) - 1 ] if l . includeLine { logMsg . Line = no } } if logConfig . Async { logMsgChannel <- logMsg } else { doLog ( logMsg ) } }
createLogMessage function creates a new log message with actual content variables
createLogMessage function creates a new log message with actual content variables