formatters.go
func (formatter *StandardFormatter) Format(record *Record) string {
	var message string
	now := time.Now()
	if now.Sub(record.Time) <= tolerance {
		message = record.Message
	} else {
		message = fmt.Sprintf("[%v] %v", record.Time.Format(formatter.TimeFormat), record.Message)
	}
	return fmt.Sprintf("[%v] %v %v", now.Format(formatter.TimeFormat), record.Level, message)
}
func (formatter *StandardFormatter) Format(record *Record) string {
	var message string
	now := time.Now()
	if now.Sub(record.Time) <= tolerance {
		message = record.Message
	} else {
		message = fmt.Sprintf("[%v] %v", record.Time.Format(formatter.TimeFormat), record.Message)
	}
	return fmt.Sprintf("[%v] %v %v", now.Format(formatter.TimeFormat), record.Level, message)
}
func ( formatter * StandardFormatter ) Format ( record * Record ) string { var message string now := time . Now ( ) if now . Sub ( record . Time ) <= tolerance { message = record . Message } else { message = fmt . Sprintf ( " " , record . Time . Format ( formatter . TimeFormat ) , record . Message ) } return fmt . Sprintf ( " " , now . Format ( formatter . TimeFormat ) , record . Level , message ) }
// Format constructs string for logging. Time of logging is added to log message.
// Also, if time of logging is more then 100 miliseconds in the passt, both
// times will be added to message (time when application sent log and time when
// message was processed). Otherwise, only time of processing will be written.
Format constructs string for logging . Time of logging is added to log message . Also if time of logging is more then 100 miliseconds in the passt both times will be added to message ( time when application sent log and time when message was processed ) . Otherwise only time of processing will be written .