Docker Community Forums

Share and learn in the Docker community.

Docker logs for Windows containers

What sort of magic voodoo do you have to do to get docker logs to work on Windows?

docker logs works the same way as expected and works for me. What is exactly broken for you?

What directory/directories does it pull the logs from? Does it pull from the Event Log? If so, which log? I containerized nerd-dinner using Image2Docker. When I try pulling the logs, I get nothing. On other Windows/IIS containers, I can partial information from inetpub/wwwroot.

-Jeremy

Which logs are you refering to? IIS logs inside container? Docker logs?
For docker it’s docker logs <containerID>

I know how to get docker logs. I’m used to seeing more information on Linux when I run docker logs.

What exactly are you looking to accomplish?

I’d like to be able to get the IIS logs. I realize I may have to use a log driver to get them though.

IIS by default is not logging anything. You have to enable logging. I just accidentally actually wrote a blog how to put those into output stream.

http://artisticcheese.wordpress.com

Awesome! Thank you. This is precisely what I was looking for. Do you need to do this for the Kestrel server too? I haven’t had a chance to try it yet.

This logs are IIS only, I don’t think it will work with other HTTP server implementations.

A new opensource tool has been released for windows container log monitoring.

Github repo: https://github.com/microsoft/windows-container-tools

Blog post with instructions: https://techcommunity.microsoft.com/t5/Containers/Windows-Containers-Log-Monitor-Opensource-Release/ba-p/973947