fleet/server/mdm/apple
Victor Lyuboslavsky aaac4b1dfe
Changes needed before gokit/log to slog transition. (#39527)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #38889

PLEASE READ BELOW before looking at file changes

Before converting individual files/packages to slog, we generally need
to make these 2 changes to make the conversion easier:
- Replace uses of `kitlog.With` since they are not fully compatible with
our kitlog adapter
- Directly use the kitlog adapter logger type instead of the kitlog
interface, which will let us have direct access to the underlying slog
logger: `*logging.Logger`

Note: that I did not replace absolutely all uses of `kitlog.Logger`, but
I did remove all uses of `kitlog.With` except for these due to
complexity:
- server/logging/filesystem.go and the other log writers (webhook,
firehose, kinesis, lambda, pubsub, nats)
- server/datastore/mysql/nanomdm_storage.go (adapter pattern)
- server/vulnerabilities/nvd/* (cascades to CLI tools)
- server/service/osquery_utils/queries.go (callback type signatures
cascade broadly)
- cmd/maintained-apps/ (standalone, so can be transitioned later all at
once)

Most of the changes in this PR follow these patterns:
- `kitlog.Logger` type → `*logging.Logger`
- `kitlog.With(logger, ...)` → `logger.With(...)`
- `kitlog.NewNopLogger() → logging.NewNopLogger()`, including similar
variations such as `logging.NewLogfmtLogger(w)` and
`logging.NewJSONLogger(w)`
- removed many now-unused kitlog imports

Unique changes that the PR review should focus on:
- server/platform/logging/kitlog_adapter.go: Core adapter changes
- server/platform/logging/logging.go: New convenience functions
- server/service/integration_logger_test.go: Test changes for slog

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
  - Was added in previous PR

## 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

* **Refactor**
* Migrated the codebase to a unified internal structured logging system
for more consistent, reliable logs and observability.
* No user-facing functionality changed; runtime behavior and APIs remain
compatible.
* **Tests**
* Updated tests to use the new logging helpers to ensure consistent test
logging and validation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-11 10:08:33 -06:00
..
apple_apps Expose VPP metadata bearer token as public config, interact directly with Apple when set (#38817) 2026-01-27 16:50:40 -06:00
appmanifest Additional CA validation (#27169) 2025-03-19 08:27:55 -05:00
gdmf Add support for iPods under iOS devices (#27432) 2026-01-29 13:54:37 -05:00
mobileconfig Experimental fleet server config for custom updates & disk encryption settings (#34598) 2025-10-22 13:51:10 -04:00
rootcert Added Apple Root Cert for gdmf request. (#27483) 2025-03-24 19:26:36 -05:00
vpp Expose VPP metadata bearer token as public config, interact directly with Apple when set (#38817) 2026-01-27 16:50:40 -06:00
apple_bm.go Changes needed before gokit/log to slog transition. (#39527) 2026-02-11 10:08:33 -06:00
apple_mdm.go Changes needed before gokit/log to slog transition. (#39527) 2026-02-11 10:08:33 -06:00
apple_mdm_external_test.go Changes needed before gokit/log to slog transition. (#39527) 2026-02-11 10:08:33 -06:00
apple_mdm_test.go Changes needed before gokit/log to slog transition. (#39527) 2026-02-11 10:08:33 -06:00
AppleIphoneDeviceCA.cer implement OTA enrollment (#21942) 2024-09-10 16:52:17 -03:00
cert.go Add SCEP endpoint for host identity. (#30589) 2025-07-11 11:44:07 -03:00
commander.go Add missing unit test (#38439) 2026-01-16 13:31:32 -05:00
commander_test.go Add lost mode behaviour for iOS/iPadOS (#33805) 2025-10-14 11:30:05 -03:00
deviceinfo.go Only allow FLEET_DEV_* env vars when --dev is passed, allow overriding configs one at a time in dev (#38652) 2026-01-27 14:32:56 -06:00
profile_matcher.go Experimental fleet server config for custom updates & disk encryption settings (#34598) 2025-10-22 13:51:10 -04:00
profile_matcher_test.go Error on signed configuration profiles (#33341) 2025-09-25 14:50:48 +03:00
profile_verifier.go Reset retry counter when resending cert profiles for expired challenges (#35282) 2025-11-07 15:35:02 -06:00
profile_verifier_test.go allow to verify profiles that are pending (#15911) 2024-01-04 18:26:04 -03:00
util.go Add missing unit test (#38439) 2026-01-16 13:31:32 -05:00
util_test.go Add missing unit test (#38439) 2026-01-16 13:31:32 -05:00