Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/1.6] Backport: Change os.Stderr reassign for Windows service #7242

Merged
merged 1 commit into from Aug 2, 2022

Commits on Aug 2, 2022

  1. Change os.Stderr reassign for Windows service

    Previously we were reassigning os.Stderr to the panic.log file we create
    when getting asked to run Containerd as a Windows service. The panic.log
    file was used as a means to easily collect panic stacks as Windows
    services don't have regular standard IO, and the usual recommendation
    is to either write to the event log or just to a file in the case of
    running as a service.
    
    One place where this panic.log flow was biting us was with shim logging,
    which is forwarded from the shim and copied to os.Stderr directly which was
    causing shim logs to get forwarded to this panic.log file instead of just
    panics. We expose an additional `--log-file` flag if you ask to run a
    windows service which is the main way you'd get Containerd logs, and with
    this change all of the shim logging which would today end up in panic.log
    will now also go to this log file.
    
    Signed-off-by: Daniel Canter <dcanter@microsoft.com>
    (cherry picked from commit ee0f2e9)
    Signed-off-by: Daniel Canter <dcanter@microsoft.com>
    dcantah committed Aug 2, 2022
    Copy the full SHA
    0578d20 View commit details
    Browse the repository at this point in the history