// Log a copy of the badgestate with some zeros stripped off for brevity.
482646
func (b *Badger) log(ctx context.Context, state1 keybase1.BadgeState) {
	var state2 keybase1.BadgeState
	state2 = state1
	state2.Conversations = nil
	for _, c1 := range state1.Conversations {
		if c1.UnreadMessages == 0 {
			continue
		}
		c2id := c1.ConvID
		if len(c1.ConvID) >= chat1.DbShortFormLen {
			// This is the db short form for logging brevity only.
			// Don't let this leave this method.
			c2id = chat1.ConversationID([]byte(c1.ConvID)).DbShortForm()
		}

		c2 := keybase1.BadgeConversationInfo{
			ConvID:         c2id,
			UnreadMessages: c1.UnreadMessages,
			BadgeCounts:    c1.BadgeCounts,
		}
		state2.Conversations = append(state2.Conversations, c2)
	}
	b.G().Log.CDebugf(ctx, "Badger send: %+v", state2)
}
382404
func (f *MultiFilter) Log(keyvals ...interface{}) {
	if f.Disabled() {
		return
	}
	for _, filter := range f.Filters {
		if filter.WouldLog(keyvals...) {
			f.PassTo.Log(keyvals...)
			return
		}
	}
}
1294528
func (c remoteHandler) Log(record *Record) error {
	return c(record.Message, record.Time, record.Level, record.Call, record.Context)
}
426010
func (u *Ugen) Log10() Input {
	return unaryOpLog10(u.Rate, u, u.NumOutputs)
}
819315
func (l *LogfmtLogger) Log(keyvals ...interface{}) error {
	// The Logger interface requires implementations to be safe for concurrent
	// use by multiple goroutines. For this implementation that means making
	// only one call to l.w.Write() for each call to Log. We first collect all
	// of the bytes into b, and then call l.w.Write(b).
	if len(keyvals)%2 != 0 {
		keyvals = append(keyvals[0:len(keyvals)-1:len(keyvals)-1], l.MissingValueKey, keyvals[len(keyvals)-1])
	}
	b, err := logfmt.MarshalKeyvals(keyvals...)
	if err != nil {
		return err
	}
	b = append(b, '\n')
	if _, err := l.Out.Write(b); err != nil {
		return errors.Annotate(err, "cannot write out logfmt for log")
	}
	return nil
}
823721
func (p *ScribeClient) Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) {
  var _args0 ScribeLogArgs
  _args0.Messages = messages
  var _result1 ScribeLogResult
  if err = p.Client_().Call(ctx, "Log", &_args0, &_result1); err != nil {
    return
  }
  return _result1.GetSuccess(), nil
}
365875
func Log(c context.Context, err error, excludePkgs ...string) {
	log := logging.Get(c)
	for _, l := range RenderStack(err, excludePkgs...) {
		log.Errorf("%s", l)
	}
}
1005308
func (p *PackageLogger) Log(l LogLevel, args ...interface{}) {
	p.internalLog(calldepth, l, fmt.Sprint(args...))
}
1123375
func (s *agentLoggingStrategy) WriteLog(m params.LogRecord) error {
	level, _ := loggo.ParseLevel(m.Level)
	dbErr := errors.Annotate(s.dblogger.Log([]state.LogRecord{{
		Time:     m.Time,
		Entity:   s.entity,
		Version:  s.version,
		Module:   m.Module,
		Location: m.Location,
		Level:    level,
		Message:  m.Message,
	}}), "logging to DB failed")

	m.Entity = s.entity.String()
	fileErr := errors.Annotate(
		logToFile(s.fileLogger, s.filePrefix, m),
		"logging to logsink.log failed",
	)
	err := dbErr
	if err == nil {
		err = fileErr
	} else if fileErr != nil {
		err = errors.Errorf("%s; %s", dbErr, fileErr)
	}
	return err
}
234261
func (logger *Logger) Log(level Level, v ...interface{}) {
	// Don't delete this calling. The calling is used to keep the same
	// calldepth for all the logging functions. The calldepth is used to
	// get runtime information such as line number, function name, etc.
	logger.log(level, v...)
}
1003238
func (m *Metrics) Log() {
	m.Lock()
	defer m.Unlock()

	log.Debug("Logging all timers")

	scale := time.Second
	du := float64(scale)
	units := scale.String()[1:]

	r := m.Registry

	r.Each(func(name string, i interface{}) {
		switch metric := i.(type) {
		// Other types/metrics shown in https://github.com/rcrowley/go-metrics/blob/master/log.go#L21
		case gometrics.Timer:
			t := metric.Snapshot()
			ps := t.Percentiles([]float64{0.5, 0.75, 0.95, 0.99, 0.999})
			log.WithFields(logrus.Fields{
				"count":     t.Count(),
				"sum":       fmt.Sprintf("%.4f", float64(t.Sum())/du),
				"min":       fmt.Sprintf("%.4f", float64(t.Min())/du),
				"max":       fmt.Sprintf("%.4f", float64(t.Max())/du),
				"mean":      fmt.Sprintf("%.4f", t.Mean()/du),
				"stddev":    fmt.Sprintf("%.4f", t.StdDev()/du),
				"median":    fmt.Sprintf("%.4f", ps[0]/du),
				"units":     units,
				"groupname": m.GroupName,
			}).Debug(name)
		}
	})

	// Disable and clear all metrics.
	m.Enabled = false
	r.UnregisterAll()
	m.Timers = make(map[string]gometrics.Timer)
}
55573
func (g *Git) Log(format string) *command.Model {
	return g.command("log", "-1", "--format="+format)
}
769300
func (ns *Namespace) Log(a interface{}) (float64, error) {
	af, err := cast.ToFloat64E(a)

	if err != nil {
		return 0, errors.New("Log operator can't be used with non integer or float value")
	}

	return math.Log(af), nil
}
49624
func (l *Logger) log(keyvals ...interface{}) error {
	if l.logMutex == nil {
		l.logMutex = new(sync.Mutex)
	}

	l.logMutex.Lock()
	defer l.logMutex.Unlock()

	var writer io.Writer
	if l.Writer == nil {
		writer = os.Stdout
	} else {
		writer = l.Writer
	}

	var formatter Formatter
	if l.Formatter == nil {
		formatter = JSONFormatter{}
	} else {
		formatter = l.Formatter
	}

	var err = formatter.Format(writer, append(l.context, keyvals...)...)
	return err
}
860828
func (c *C) log(args ...interface{}) {
	c.writeLog([]byte(fmt.Sprint(args...) + "\n"))
}
738684
func (vr *ValidationResult) Log(ctx context.Context) {
	for _, msg := range vr.Messages {
		lvl := logging.Info
		switch msg.Severity {
		case "WARNING":
			lvl = logging.Warning
		case "ERROR", "CRITICAL":
			lvl = logging.Error
		}
		logging.Logf(ctx, lvl, "%s: %s", msg.Path, msg.Text)
	}
}
79831
func (u *Ugen) Log2() Input {
	return unaryOpLog2(u.Rate, u, u.NumOutputs)
}