@@ -145,7 +145,7 @@ func RunStats(ctx context.Context, dockerCLI command.Cli, options *StatsOptions)
145145 eh .setHandler (events .ActionCreate , func (e events.Message ) {
146146 if s := NewStats (e .Actor .ID ); cStats .add (s ) {
147147 waitFirst .Add (1 )
148- log .G (ctx ).WithFields (map [ string ] any {
148+ log .G (ctx ).WithFields (log. Fields {
149149 "event" : e .Action ,
150150 "container" : e .Actor .ID ,
151151 }).Debug ("collecting stats for container" )
@@ -157,7 +157,7 @@ func RunStats(ctx context.Context, dockerCLI command.Cli, options *StatsOptions)
157157 eh .setHandler (events .ActionStart , func (e events.Message ) {
158158 if s := NewStats (e .Actor .ID ); cStats .add (s ) {
159159 waitFirst .Add (1 )
160- log .G (ctx ).WithFields (map [ string ] any {
160+ log .G (ctx ).WithFields (log. Fields {
161161 "event" : e .Action ,
162162 "container" : e .Actor .ID ,
163163 }).Debug ("collecting stats for container" )
@@ -167,7 +167,7 @@ func RunStats(ctx context.Context, dockerCLI command.Cli, options *StatsOptions)
167167
168168 if ! options .All {
169169 eh .setHandler (events .ActionDie , func (e events.Message ) {
170- log .G (ctx ).WithFields (map [ string ] any {
170+ log .G (ctx ).WithFields (log. Fields {
171171 "event" : e .Action ,
172172 "container" : e .Actor .ID ,
173173 }).Debug ("stop collecting stats for container" )
@@ -232,7 +232,7 @@ func RunStats(ctx context.Context, dockerCLI command.Cli, options *StatsOptions)
232232 for _ , ctr := range cs .Items {
233233 if s := NewStats (ctr .ID ); cStats .add (s ) {
234234 waitFirst .Add (1 )
235- log .G (ctx ).WithFields (map [ string ] any {
235+ log .G (ctx ).WithFields (log. Fields {
236236 "container" : ctr .ID ,
237237 }).Debug ("collecting stats for container" )
238238 go collect (ctx , s , apiClient , ! options .NoStream , waitFirst )
@@ -255,7 +255,7 @@ func RunStats(ctx context.Context, dockerCLI command.Cli, options *StatsOptions)
255255 for _ , ctr := range options .Containers {
256256 if s := NewStats (ctr ); cStats .add (s ) {
257257 waitFirst .Add (1 )
258- log .G (ctx ).WithFields (map [ string ] any {
258+ log .G (ctx ).WithFields (log. Fields {
259259 "container" : ctr ,
260260 }).Debug ("collecting stats for container" )
261261 go collect (ctx , s , apiClient , ! options .NoStream , waitFirst )
0 commit comments