base.go
func (b *Base) LogWithTime(level LogLevel, ts time.Time, m *Attrs, msg string, a ...interface{}) error {
	if !b.shouldLog(level) {
		return nil
	}

	if !b.isInitialized {
		return ErrNotInitialized
	}

	if len(b.config.FilenameAttr) > 0 || len(b.config.LineNumberAttr) > 0 {
		file, line := getCallerInfo()
		if m == nil {
			m = NewAttrs()
		}
		if len(b.config.FilenameAttr) > 0 {
			m.SetAttr(b.config.FilenameAttr, file)
		}
		if len(b.config.LineNumberAttr) > 0 {
			m.SetAttr(b.config.LineNumberAttr, line)
		}
	}

	if len(b.config.SequenceAttr) > 0 {
		if m == nil {
			m = NewAttrs()
		}
		seq := atomic.AddUint64(&b.sequence, 1)
		m.SetAttr(b.config.SequenceAttr, seq)
	}

	nm := newMessage(ts, b, level, m, msg, a...)

	for _, hook := range b.hookPreQueue {
		err := hook.PreQueue(nm)
		if err != nil {
			return err
		}
	}

	return b.queue.queueMessage(nm)
}
func (b *Base) LogWithTime(level LogLevel, ts time.Time, m *Attrs, msg string, a ...interface{}) error {
	if !b.shouldLog(level) {
		return nil
	}

	if !b.isInitialized {
		return ErrNotInitialized
	}

	if len(b.config.FilenameAttr) > 0 || len(b.config.LineNumberAttr) > 0 {
		file, line := getCallerInfo()
		if m == nil {
			m = NewAttrs()
		}
		if len(b.config.FilenameAttr) > 0 {
			m.SetAttr(b.config.FilenameAttr, file)
		}
		if len(b.config.LineNumberAttr) > 0 {
			m.SetAttr(b.config.LineNumberAttr, line)
		}
	}

	if len(b.config.SequenceAttr) > 0 {
		if m == nil {
			m = NewAttrs()
		}
		seq := atomic.AddUint64(&b.sequence, 1)
		m.SetAttr(b.config.SequenceAttr, seq)
	}

	nm := newMessage(ts, b, level, m, msg, a...)

	for _, hook := range b.hookPreQueue {
		err := hook.PreQueue(nm)
		if err != nil {
			return err
		}
	}

	return b.queue.queueMessage(nm)
}
// LogWithTime will log a message at the provided level to all added loggers with the timestamp set to the
// value of ts.