// Log logs a record to the logfile and flushes the buffer
558126
func (lr *LogRecord) Log() {
	flowdebug.Log(lr.getLogFields(), "Logging flow record")

	// Lock while writing access log so we serialize writes as we may have
	// to reopen the logfile and parallel writes could fail because of that
	logMutex.Lock()
	defer logMutex.Unlock()

	lr.Metadata = metadata

	if notifier != nil {
		notifier.NewProxyLogRecord(lr)
	}

	if logger == nil {
		flowdebug.Log(log.WithField(FieldFilePath, logPath),
			"Skipping writing to access log (logger nil)")
		return
	}

	if _, err := logger.Write(lr.getRawLogMessage()); err != nil {
		log.WithError(err).WithField(FieldFilePath, logPath).
			Errorf("Error writing to access file")
	}
}
984815
func (l *syncLogger) Log(keyvals ...interface{}) error {
	l.mu.Lock()
	err := l.logger.Log(keyvals...)
	l.mu.Unlock()
	return err
}
716794
func (l *IoLogger) Log(data Data) error {
	line := fmt.Sprintf("%s\n", BuildLog(data, l.AddTime))
	_, err := l.stream.Write([]byte(line))
	return err
}
1175661
func (inv *Investigate) Log(s string) {
	if inv.verbose {
		inv.log.Println(s)
	}
}
1154804
func (c callHandler) Log(log *log15.Record) error {
	ctx := log.Ctx
	var ctxMap ContextMap
	if len(ctx) > 0 {
		ctxMap = make(ContextMap, len(ctx)/2)

		for i := 0; i < len(ctx); i += 2 {
			v := ctx[i]
			key, ok := v.(string)
			if !ok {
				key = fmt.Sprintf("LOGGER_INVALID_KEY %v", v)
			}
			var value interface{}
			if len(ctx) > i+1 {
				value = ctx[i+1]
			} else {
				value = "LOGGER_VALUE_MISSING"
			}
			ctxMap[key] = value
		}
	} else {
		ctxMap = make(ContextMap, 0)
	}
	r := &Record{Message: log.Msg, Context: ctxMap, Time: log.Time, Level: LogLevel(log.Lvl), Call: CallStack(log.Call)}
	return c(r)
}
1218590
func (cl *Call) Log(arguments ...interface{}) {
	cl.scope.log(cl.entry, fmt.Sprintln(arguments...))
}
95192
func (s *ServerRPC) Log(level hlog.LogLevel, args ...interface{}) {
	hlog.HLog(level, s, 1, args...)
}
177718
func (w *WAL) Log(recs ...[]byte) error {
	w.mtx.Lock()
	defer w.mtx.Unlock()
	// Callers could just implement their own list record format but adding
	// a bit of extra logic here frees them from that overhead.
	for i, r := range recs {
		if err := w.log(r, i == len(recs)-1); err != nil {
			return err
		}
	}
	return nil
}
943490
func (l *Logger) Log(level LogLevel, v ...interface{}) {
	if l.getLevel() <= level {
		l.getHandler().Log(l.name, level, fmt.Sprint(v...), 1)
	}
}
1117057
func (l *ChannelLogger) Log(data Data) error {
	l.channel <- data
	return nil
}
367732
func (c *Client) log(r *http.Request, resp *http.Response) {
	if c.Log != nil {
		var (
			reqDump  string
			respDump []byte
		)

		if r != nil {
			reqDump = fmt.Sprintf("%s %s. Data: %s", r.Method, r.URL.String(), r.Form.Encode())
		}
		if resp != nil {
			respDump, _ = httputil.DumpResponse(resp, true)
		}

		c.Log.Write([]byte(fmt.Sprintf("Request: %s\nResponse: %s\n", reqDump, string(respDump))))
	}
}
148428
func (f HandlerFunc) Log(logger_name string, level LogLevel, msg string,
	calldepth int) {
	f(logger_name, level, msg, calldepth)
}
860828
func (c *C) log(args ...interface{}) {
	c.writeLog([]byte(fmt.Sprint(args...) + "\n"))
}
1168779
func (l *Logger) Log(level Level, v ...interface{}) {
	l.print(level, fmt.Sprint(v...), l.NewLine)
}
531563
func (l *Logger) Log(format string, args ...interface{}) {
	l.log(1, false, format, args...)
}
615090
func (b *BufferedLogger) flush() error {
	if b.flushTimer != nil {
		b.flushTimer.Stop()
		b.flushTimer = nil
	}
	if len(b.buf) > 0 {
		if err := b.l.Log(b.buf); err != nil {
			return errors.Trace(err)
		}
		b.buf = b.buf[:0]
	}
	return nil
}
1230978
func (p *XPod) Log(level hlog.LogLevel, args ...interface{}) {
	hlog.HLog(level, p, 1, args...)
}