microsoft / IIS.ServiceMonitor

An entrypoint process for running IIS in Windows containers
MIT License
127 stars 39 forks source link

Redirect specified log file to output #68

Open TripleEmcoder opened 4 years ago

TripleEmcoder commented 4 years ago

Usually Docker containers output logs to the console, which lets users access them with docker logs or kubectl logs. That is not the case with IIS and ServiceMonitor - we get nothing. Classic ASP.NET applications do have their logs though. It would be a great feature if we could pass a second argument to ServiceMonitor with a log file path, which would then be read (like with tail -f) and written to the standard output for Docker tools to consume.

jhkimnew commented 4 years ago

You can use the LogMonitor for that.

Please refer to the section (How to apply the new feature to existing IIS tags) at https://blogs.iis.net/jeonghwan/how-to-use-iis-insider-docker-tag how to use the LogMonitor.

gpratik commented 4 years ago

I too am facing same problem to redirect iis conatiner image logs to default aws cloudwatch log configuration. I can't even use insider image as i am using Images based on windows server 2016 ltsc.
Do you think i should move to self hosted way than using iis for hosting and servicmonitor as entrypoint.