// log writes a string verbatim to the sink.
//
// It returns the number of bytes "n" written to the sink and the error "err",
// if one was encountered.
6594
func (l *Logger) log(str string) (n int, err error) {
	return fmt.Fprint(l.sink, str)
}
353565
func (flag *OutputFlag) Log(s string) (int, error) {
	if len(s) > 0 && s[0] == '\r' {
		flag.Write([]byte{'\r', 033, '[', 'K'})
		s = s[1:]
	}

	return flag.WriteString(time.Now().Format("[02-01-06 15:04:05] ") + s)
}
953829
func (c *CustomHandler) Log(e log.Entry) {

	// below prints to os.Stderr but could marshal to JSON
	// and send to central logging server
	//																						       ---------
	// 				                                                                 |----------> | console |
	//                                                                               |             ---------
	// i.e. -----------------               -----------------     Unmarshal    -------------       --------
	//     | app log handler | -- json --> | central log app | --    to    -> | log handler | --> | syslog |
	//      -----------------               -----------------       Entry      -------------       --------
	//      																         |             ---------
	//                                  									         |----------> | DataDog |
	//          																	        	   ---------
	b := new(bytes.Buffer)
	b.Reset()
	b.WriteString(e.Message)

	for _, f := range e.Fields {
		fmt.Fprintf(b, " %s=%v", f.Key, f.Value)
	}
	fmt.Println(b.String())
}
903520
func (logger *Logger) Log(level log.Level, args ...interface{}) {
	logger.output(level, args...)
}
204044
func (as ArraySpec) Log() Input {
	return as.proc(func(i Input) Input {
		return i.Log()
	})
}
641865
func log(level string, v ...interface{}) {
	golog.Print(clock(), level, fmt.Sprint(v...))
}
851436
func (l *JSONFileLogger) Log(msg *logger.Message) error {
	l.mu.Lock()
	err := l.writer.WriteLogEntry(msg)
	l.mu.Unlock()
	return err
}
957329
func (l *Logger) Log(severity int, msg string, fields map[string]interface{}) error {
	if severity > l.Threshold() {
		return nil
	}

	// format the message before acquiring mutex for better concurrency.
	t := time.Now()
	buf := pool.Get().([]byte)
	defer pool.Put(buf)

	b, err := l.Formatter().Format(buf, l, t, severity, msg, fields)
	if err != nil {
		return err
	}

	l.mu.Lock()
	defer l.mu.Unlock()

	if l.output == nil {
		return nil
	}

	_, err = l.output.Write(b)
	if err == nil {
		return nil
	}
	err = l.handleError(err)
	if err == nil {
		return nil
	}
	return errors.Wrap(err, "Logger.Log")
}
1164032
func Log(num, base cty.Value) (cty.Value, error) {
	return LogFunc.Call([]cty.Value{num, base})
}
147664
func Log(logger *log.Logger, next http.Handler) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		remoteAddr := r.Header.Get("X-Real-IP")
		if remoteAddr == "" {
			remoteAddr = r.RemoteAddr
		} else {
			// FIXME write a benchmark to check if is worth string concatenation
			// optimization using []byte.
			remoteAddr += " (X-Real-IP)"
		}
		logger.Println(r.Method, remoteAddr, r.URL)
		next.ServeHTTP(w, r)
	}
}
1374502
func Log(a ...interface{}) {
	format := ""

	for range a {
		format += "%v "
	}

	format = format[:len(format)-1]
	Logger(format, a...)
}
378085
func (l *Logger) Log(level Level, format string, a ...interface{}) {
	if level > l.MaxLevel || !l.open {
		return
	}
	message := format
	if len(a) > 0 {
		message = fmt.Sprintf(format, a...)
	}
	entry := &Entry{
		Category: l.Category,
		Level:    level,
		Message:  message,
		Time:     time.Now(),
	}
	if l.CallStackDepth > 0 {
		entry.CallStack = GetCallStack(3, l.CallStackDepth, l.CallStackFilter)
	}
	entry.FormattedMessage = l.Formatter(l, entry)
	l.entries <- entry
}
1245461
func (table *RegommendTable) log(v ...interface{}) {
	if table.logger == nil {
		return
	}

	table.logger.Println(v...)
}
537251
func Log(source string, r *Registry, d time.Duration) {
	for range time.Tick(d) {
		var parts []string
		for k, m := range r.Instruments() {
			switch i := m.(type) {
			case instruments.Discrete:
				s := i.Snapshot()
				parts = append(parts, fmt.Sprintf("sample#%s=%d", k, s))
			case instruments.Sample:
				s := instruments.Quantile(i.Snapshot(), 0.95)
				parts = append(parts, fmt.Sprintf("sample#%s=%d", k, s))
			}
		}
		log.Println(fmt.Sprintf("source=%s", source), strings.Join(parts, " "))
	}
}
672473
func (r *RingLogger) Log(msg *Message) error {
	if r.closed() {
		return errClosed
	}
	return r.buffer.Enqueue(msg)
}
1313041
func (logger *Logger) Log(priority Priority, v ...interface{}) {
	fields := logger.fieldValues()
	fields["priority"] = priority
	fields["message"] = fmt.Sprint(v...)
	for _, sink := range logger.sinks {
		sink.Log(fields)
	}
}
258740
func (c *ChannelLogger) Log(kvs ...interface{}) {
	if c.OnFull != nil {
		c.logNonBlocking(kvs...)
		return
	}
	c.logBlocking(kvs...)
}