使用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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM