Commit 26151ec
Add debug logging to container detection in sys/container.go
Add a package-level debug logger (logSys) to the sys package following
the project's pkg:filename naming convention. Add 4 meaningful debug log
calls to IsRunningInContainer() that trace which detection method (dockerenv
file, cgroup, or env var) triggered container detection, or confirm when no
container environment is found.
This helps developers and operators understand container detection behavior
at runtime with DEBUG=sys:* or DEBUG=* enabled.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 6470017 commit 26151ec
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
| 18 | + | |
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
| |||
20 | 27 | | |
21 | 28 | | |
22 | 29 | | |
| 30 | + | |
23 | 31 | | |
24 | 32 | | |
25 | 33 | | |
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
| 37 | + | |
29 | 38 | | |
30 | 39 | | |
31 | 40 | | |
| 41 | + | |
32 | 42 | | |
33 | 43 | | |
0 commit comments