Transitioned activity bounded context to slog. (#39773)

<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #38889 

# Checklist for submitter

- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
  - Changes file already exists

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Updated internal logging infrastructure across activity service
modules to enhance code consistency and maintainability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Victor Lyuboslavsky
2026-02-16 14:23:36 -06:00
committed by GitHub
parent 0e729604ed
commit 988f0bbcc6
9 changed files with 29 additions and 22 deletions
+3 -2
View File
@@ -9,6 +9,7 @@ import (
"database/sql/driver"
"errors"
"fmt"
"log/slog"
"math/rand"
"net/http"
"net/url"
@@ -1010,7 +1011,7 @@ the way that the Fleet server works.
level.Info(logger).Log("instanceID", instanceID)
// Bootstrap activity bounded context (needed for cron schedules and HTTP routes)
activitySvc, activityRoutes := createActivityBoundedContext(svc, dbConns, logger)
activitySvc, activityRoutes := createActivityBoundedContext(svc, dbConns, logger.SlogLogger())
// Perform a cleanup of cron_stats outside of the cronSchedules because the
// schedule package uses cron_stats entries to decide whether a schedule will
@@ -1757,7 +1758,7 @@ the way that the Fleet server works.
return serveCmd
}
func createActivityBoundedContext(svc fleet.Service, dbConns *common_mysql.DBConnections, logger kitlog.Logger) (activity_api.Service, endpointer.HandlerRoutesFunc) {
func createActivityBoundedContext(svc fleet.Service, dbConns *common_mysql.DBConnections, logger *slog.Logger) (activity_api.Service, endpointer.HandlerRoutesFunc) {
legacyAuthorizer, err := authz.NewAuthorizer()
if err != nil {
initFatal(err, "initializing activity authorizer")