使用PowerShell实时查看日志文件的变化

开发过程中,会有好多的日志输出到日志文件中了,每次看日志都需要打开,log文件,觉得麻烦

找了个省事的方法

使用PowerShell

使用命令:Get-Content D:\www\webapp1\Logs\t20190116.log -wait

Get-Content 获取指定文件的内容

-wait:等待文件输出,每秒检查一次,ctrl+c退出

参考:https://docs.microsoft.com/zh-cn/powershell/module/Microsoft.PowerShell.Management/Get-Content?view=powershell-5.1

posted @ 2019-01-16 11:22  木油  阅读(3237)  评论(0编辑  收藏  举报