// Log implements Service.Log. It returns the docker logs for each container related to the service.
438421
func (s *Service) Log(ctx context.Context, follow bool) error {
	return s.collectContainersAndDo(ctx, func(c *container.Container) error {
		containerNumber, err := c.Number()
		if err != nil {
			return err
		}
		name := fmt.Sprintf("%s_%d", s.name, containerNumber)
		if s.Config().ContainerName != "" {
			name = s.Config().ContainerName
		}
		l := s.context.LoggerFactory.CreateContainerLogger(name)
		return c.Log(ctx, l, follow)
	})
}
1203477
func (uow *UnitOfWork) Logs(follow bool, timestamps bool, tail string, colorize bool, since string) {
	uow.Targeted().Logs(follow, timestamps, tail, colorize, since)
}
1358785
func (c *config) log(event Event, err error, args ...interface{}) {
	if c.lfunc != nil {
		c.lfunc(event, err, args...)
	}
}
968225
func (a *AgentServer) GetDockerLogs(dockerID string, logs *string) error {
	cmd := exec.Command("docker", "logs", "--tail=2000", dockerID)
	output, err := cmd.CombinedOutput()
	if err != nil {
		plog.WithError(err).WithField("dockerid", dockerID).Error("Unable to retrieve logs from docker")
		return err
	}
	*logs = string(output)
	return nil
}
1338308
func (g *Gate) Log(kvs ...interface{}) {
	if !g.Disabled() {
		g.Logger.Log(kvs...)
	}
}
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
}
1374502
func Log(a ...interface{}) {
	format := ""

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

	format = format[:len(format)-1]
	Logger(format, a...)
}
1117057
func (l *ChannelLogger) Log(data Data) error {
	l.channel <- data
	return nil
}
1132324
func (m *Manager) log(s string, v ...interface{}) {
	if m.Logf != nil {
		m.Logf(s, v...)
	}
}
890320
func (c *Context) Log() *log.Entry {
	fields := log.Fields{"service": c.ServiceName}

	if Config.Debug {
		pc := make([]uintptr, 10)
		runtime.Callers(2, pc)
		f := runtime.FuncForPC(pc[0])
		fields["file"], fields["line"] = f.FileLine(pc[0])
		fields["func"] = f.Name()
	}

	if c.User.ID > 0 {
		fields["user"] = c.User.ID
	}
	if c.Chat.ID != 0 {
		fields["chat"] = c.Chat.ID
	}
	if c.Message != nil {
		fields["msg"] = c.Message.GetTextHash()
	}

	if c.ChosenInlineResult != nil {
		fields["chosenresult"] = c.ChosenInlineResult
	}

	if c.InlineQuery != nil {
		fields["inlinequery"] = c.InlineQuery
	}

	if c.Callback != nil {
		fields["callback"] = c.Callback.Data
		fields["callback_id"] = c.Callback.ID

		if c.Callback.Message.MsgID > 0 {
			fields["callback_msgid"] = c.Callback.Message.MsgID
		} else {
			fields["callback_inlinemsgid"] = c.Callback.Message.InlineMsgID
		}

	}

	if c.gin != nil {
		fields["url"] = c.gin.Request.Method + " " + c.gin.Request.URL.String()
		fields["ip"] = c.gin.Request.RemoteAddr
	}

	fields["domain"] = c.ServiceBaseURL.Host

	return log.WithFields(fields)
}
805345
func (c *Context) Log(data Data) error {
	return c.Logger.Log(c.Merge(data))
}
1041311
func (sink *ReconfigurableSink) Log(level LogLevel, log []byte) {
	minLogLevel := LogLevel(atomic.LoadInt32(&sink.minLogLevel))

	if level < minLogLevel {
		return
	}

	sink.sink.Log(level, log)
}
714022
func (m *MockServiceAPIClient) ServiceLogs(ctx context.Context, serviceID string, options types.ContainerLogsOptions) (io.ReadCloser, error) {
	ret := m.ctrl.Call(m, "ServiceLogs", ctx, serviceID, options)
	ret0, _ := ret[0].(io.ReadCloser)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
887762
func Log(err error) error {
	return LogWith(err, log.V(log.Info))
}
1230978
func (p *XPod) Log(level hlog.LogLevel, args ...interface{}) {
	hlog.HLog(level, p, 1, args...)
}
1045345
func (s *Scheme) Log(l conversion.DebugLogger) {
	s.raw.Log(l)
}
1282879
func (m *Meta) Log(ctx context.Context) {
	logging.Debugf(ctx, "Meta config:")
	logging.Debugf(ctx, "  config_service_host = %q", m.ConfigServiceHost)
	logging.Debugf(ctx, "  config_dir = %q", m.ConfigDir)
	logging.Debugf(ctx, "  tracked_files = %v", m.TrackedFiles)
	logging.Debugf(ctx, "  fail_on_warnings = %v", m.FailOnWarnings)
}