Get-Content app.log -Wait -Tail 10 -Encoding UTF8
Get-Content app.log -Wait -Tail 10 -Encoding UTF8 | Select-String "keyword" -CaseSensitive -Context 1, 1
bat
脚本,需加上PowerShell
PowerShell Get-Content app.log -Wait -Tail 10 -Encoding UTF8 | Select-String "keyword" -CaseSensitive -Context 1, 1