Skip to content

Remove Windows EventLog logging hook#3550

Merged
estesp merged 2 commits intocontainerd:masterfrom
kevpar:remove-eventlog
Aug 19, 2019
Merged

Remove Windows EventLog logging hook#3550
estesp merged 2 commits intocontainerd:masterfrom
kevpar:remove-eventlog

Conversation

@kevpar
Copy link
Copy Markdown
Member

@kevpar kevpar commented Aug 19, 2019

EventLog is very old and provides a poor experience. We have supported
ETW for logging for a while, which is much better. We have also
observed an issue where EventLog keeps containerd.exe open, preventing
containerd from being upgraded to a new version. Due to all of this,
it makes sense to remove the old EventLog hook in favor of using ETW
logging on Windows as the primary diagnostic experience.

Signed-off-by: Kevin Parsons [email protected]

EventLog is very old and provides a poor experience. We have supported
ETW for logging for a while, which is much better. We have also
observed an issue where EventLog keeps containerd.exe open, preventing
containerd from being upgraded to a new version. Due to all of this,
it makes sense to remove the old EventLog hook in favor of using ETW
logging on Windows as the primary diagnostic experience.

Signed-off-by: Kevin Parsons <[email protected]>
@kevpar
Copy link
Copy Markdown
Member Author

kevpar commented Aug 19, 2019

@jterry75 PTAL

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Aug 19, 2019

Build succeeded.

Copy link
Copy Markdown
Contributor

@jterry75 jterry75 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks Kevin

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Aug 19, 2019

Build succeeded.

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 19, 2019

Codecov Report

Merging #3550 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #3550   +/-   ##
======================================
  Coverage    42.2%   42.2%           
======================================
  Files         127     127           
  Lines       13903   13903           
======================================
  Hits         5868    5868           
  Misses       7149    7149           
  Partials      886     886
Flag Coverage Δ
#linux 45.67% <ø> (ø) ⬆️
#windows 37.28% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fc9335d...64a0b2e. Read the comment docs.

@estesp estesp merged commit c537c89 into containerd:master Aug 19, 2019
@thaJeztah
Copy link
Copy Markdown
Member

@kevpar I was just looking at the equivalent code in moby/moby; wondering: was there an associated PR to replace this with ETW logging (for the daemon)? Trying to clean up some old bits (and as the code in containerd was copied from moby, perhaps I can do the same there 😅)

@kevpar
Copy link
Copy Markdown
Member Author

kevpar commented Oct 12, 2022

@kevpar I was just looking at the equivalent code in moby/moby; wondering: was there an associated PR to replace this with ETW logging (for the daemon)? Trying to clean up some old bits (and as the code in containerd was copied from moby, perhaps I can do the same there 😅)

Yes, we added a logrus hook in both containerd and moby to log to ETW:
containerd: https://github.com/containerd/containerd/blob/main/cmd/containerd/command/main_windows.go#L106-L119
moby: https://github.com/moby/moby/blob/master/cmd/dockerd/docker_windows.go#L50-L55

@thaJeztah
Copy link
Copy Markdown
Member

Ah! It was already there; thanks for finding that! Looks like I should be able to do the same on the Moby side 🎉

@jterry75
Copy link
Copy Markdown
Contributor

You may not want to for Moby. ETW is superior 100% agree, but you need to have a session for listening to the provider guid. I'm not sure that everyone will set this up so default logs in event log may be better?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants