Skip to content

Commit 66d37f9

Browse files
authored
Remove seelog replace directives and references (#45807)
### What does this PR do? Remove more seelog references. In particular the replace directives in go.mod files are useless now. ### Motivation Cleanup. Eventually remove all references. ### Describe how you validated your changes CI ### Additional Notes Seelog is still imported in `test/system/dogstatd`, I'll look into removing this separately, so that it disappears from the go.mod entirely. Co-authored-by: pierre.gimalac <pierre.gimalac@datadoghq.com>
1 parent 4d24800 commit 66d37f9

File tree

9 files changed

+10
-15
lines changed

9 files changed

+10
-15
lines changed

.github/dependabot.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ updates:
1111
# These dependencies are replaced in the main go.mod file.
1212
# They are ignored since bumping them would have no effect on the build.
1313
# To update them automatically, it is necessary to remove the `replace` directive.
14-
- dependency-name: github.com/cihub/seelog # https://github.com/DataDog/datadog-agent/pull/5647
1514
- dependency-name: github.com/spf13/cast
1615
# We only replace github.com/docker/distribution but we ignore all Docker dependencies.
1716
# Ignore internal modules

.golangci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ linters:
5151
desc: "use the v2 sdk instead"
5252
logger:
5353
files:
54-
- "!**/pkg/util/log/**"
54+
- $all
5555
deny:
5656
- pkg: "github.com/cihub/seelog"
57-
desc: "seelog should not be used directly. Use `pkg/util/log` instead."
57+
desc: "seelog should not be used. Use `pkg/util/log` instead."
5858
pkgconfigusage:
5959
files:
6060
- "**/comp/**"
@@ -220,7 +220,6 @@ linters:
220220
- (github.com/DataDog/datadog-agent/comp/core/log/def.Component).Warnf
221221
- (net/http.ResponseWriter).Write
222222
- fmt.Sscanf
223-
- github.com/cihub/seelog.Warnf
224223
- github.com/DataDog/datadog-agent/pkg/util/log.ChangeLogLevel
225224
- github.com/DataDog/datadog-agent/pkg/util/log.Critical
226225
- github.com/DataDog/datadog-agent/pkg/util/log.Criticalc

LICENSE-3rdparty.csv

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,10 @@ core,github.com/charlievieth/strcase/internal/bytealg,MIT,Copyright 2024 Charlie
669669
core,github.com/charlievieth/strcase/internal/tables,MIT,Copyright 2024 Charlie Vieth
670670
core,github.com/chrusty/protoc-gen-jsonschema,Apache-2.0,Copyright (c) 2017 The Authors
671671
core,github.com/cihub/seelog,BSD-3-Clause,"Copyright (c) 2012, Cloud Instruments Co., Ltd. <info@cin.io>"
672+
core,github.com/cihub/seelog/archive,BSD-3-Clause,"Copyright (c) 2012, Cloud Instruments Co., Ltd. <info@cin.io>"
673+
core,github.com/cihub/seelog/archive/gzip,BSD-3-Clause,"Copyright (c) 2012, Cloud Instruments Co., Ltd. <info@cin.io>"
674+
core,github.com/cihub/seelog/archive/tar,BSD-3-Clause,"Copyright (c) 2012, Cloud Instruments Co., Ltd. <info@cin.io>"
675+
core,github.com/cihub/seelog/archive/zip,BSD-3-Clause,"Copyright (c) 2012, Cloud Instruments Co., Ltd. <info@cin.io>"
672676
core,github.com/cilium/ebpf,MIT,"Copyright (c) 2017 Nathan Sweet | Copyright (c) 2018, 2019 Cloudflare | Copyright (c) 2019 Authors of Cilium"
673677
core,github.com/cilium/ebpf/asm,MIT,"Copyright (c) 2017 Nathan Sweet | Copyright (c) 2018, 2019 Cloudflare | Copyright (c) 2019 Authors of Cilium"
674678
core,github.com/cilium/ebpf/btf,MIT,"Copyright (c) 2017 Nathan Sweet | Copyright (c) 2018, 2019 Cloudflare | Copyright (c) 2019 Authors of Cilium"

comp/forwarder/orchestrator/orchestratorinterface/go.mod

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ go 1.24.0
55
require github.com/DataDog/datadog-agent/comp/forwarder/defaultforwarder v0.56.0-rc.3
66

77
// Internal deps fix version
8-
replace (
9-
github.com/cihub/seelog => github.com/cihub/seelog v0.0.0-20151216151435-d2c6e5aa9fbf // v2.6
10-
github.com/spf13/cast => github.com/DataDog/cast v1.8.0
11-
)
8+
replace github.com/spf13/cast => github.com/DataDog/cast v1.8.0
129

1310
require (
1411
github.com/DataDog/datadog-agent/comp/api/api/def v0.72.0-rc.1 // indirect

docs/public/guidelines/languages/go.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,6 @@ func TestThingFunctionality(t *testing.T) {
229229

230230
## Logging
231231

232-
Logging utilizes the [`github.com/cihub/seelog`](https://github.com/cihub/seelog) package as its underlying framework.
232+
Logging utilizes the [`log/slog`](https://pkg.go.dev/log/slog) package as its underlying framework.
233233
You can access logging through `pkg/util/log` and the `comp/core/log` component wrappers.
234234
Using the component wrapper is recommended, as it adheres to [component best practices](https://datadoghq.dev/datadog-agent/components/overview/).

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ retract (
1717

1818
// Internal deps fix version
1919
replace (
20-
github.com/cihub/seelog => github.com/cihub/seelog v0.0.0-20151216151435-d2c6e5aa9fbf // v2.6
2120
// Use a patched version of go-cmp to avoid disabling dead code elimination
2221
// Commit from https://github.com/DataDog/go-cmp/tree/dce-patch/v0.7.0
2322
github.com/google/go-cmp => github.com/DataDog/go-cmp v0.0.0-20250605161605-8f326bf2ab9d

go.sum

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/util/log/go.mod

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ module github.com/DataDog/datadog-agent/pkg/util/log
22

33
go 1.24.0
44

5-
replace github.com/cihub/seelog => github.com/cihub/seelog v0.0.0-20151216151435-d2c6e5aa9fbf // v2.6
6-
75
require (
86
github.com/DataDog/datadog-agent/pkg/template v0.64.1
97
github.com/DataDog/datadog-agent/pkg/util/scrubber v0.64.1

pkg/util/log/setup/go.mod

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ module github.com/DataDog/datadog-agent/pkg/util/log/setup
22

33
go 1.24.0
44

5-
replace github.com/cihub/seelog => github.com/cihub/seelog v0.0.0-20151216151435-d2c6e5aa9fbf // v2.6
6-
75
require (
86
github.com/DataDog/datadog-agent/pkg/config/mock v0.61.0
97
github.com/DataDog/datadog-agent/pkg/config/model v0.72.2

0 commit comments

Comments
 (0)